Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1e744bf
Reproduce stale panel preview at the resize limit
brsbl Sep 11, 2026
f5beb6e
Restore panel styles before committing snapped resize
brsbl Sep 11, 2026
cfc06de
Reproduce sidebar preference loss after transient failures
brsbl Sep 11, 2026
3889b79
Retry transient sidebar preference saves safely
brsbl Sep 11, 2026
e382ead
Remove sidebar preference retry changes from drag fix
brsbl Sep 11, 2026
34fce7e
Reproduce overwritten layout after stationary pointer release
brsbl Sep 11, 2026
10e45c3
Preserve committed layout when no resize preview ran
brsbl Sep 11, 2026
928f410
Reproduce resize release restoring transitions before React commits
brsbl Sep 12, 2026
f19f04b
Record the first committed resize in release regression
brsbl Sep 12, 2026
a3a2dae
Commit resized panel geometry before restoring transitions
brsbl Sep 12, 2026
edd61d0
Reproduce panel previews exceeding resize limits
brsbl Sep 12, 2026
1eae565
Constrain panel drag previews to the existing size limits
brsbl Sep 12, 2026
c46e3c9
Reproduce pointerleave bypassing panel drag ownership
brsbl Sep 12, 2026
64d85c3
Keep pointerleave from resizing behind an active snap preview
brsbl Sep 12, 2026
4cbc715
Specify live panel-library ownership during snapped resizing
brsbl Sep 12, 2026
99636de
Exercise the browser panel implementation in layout tests
brsbl Sep 12, 2026
4cdb9a4
Preserve pointer and keyboard event order when batching resize updates
brsbl Sep 12, 2026
b412ff3
Keep snapped panel resizing under the panel library throughout each drag
brsbl Sep 12, 2026
9f4198b
Cover native keyboard resizing during a snapped pointer session
brsbl Sep 12, 2026
409fadf
Give snapped pointer gestures one lifecycle while retaining native ke…
brsbl Sep 12, 2026
8b4f665
Simplify snapped panel drag completion and test geometry
brsbl Sep 12, 2026
7f4af01
Remove unused configuration from right-panel snapping
brsbl Sep 13, 2026
7db381a
Merge main and preserve library-owned right-panel resizing
brsbl Sep 13, 2026
d73c0e6
Merge branch 'main' of github.com:get-bb/bb into bb/investigate-drag-…
brsbl Sep 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 9 additions & 26 deletions apps/app/src/components/secondary-panel/ThreadSecondaryPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
type FocusEvent,
type PointerEvent as ReactPointerEvent,
type ReactNode,
type RefObject,
type TransitionEvent,
useCallback,
useContext,
Expand All @@ -27,7 +28,6 @@ import {
import { cn } from "@bb/shared-ui/lib/utils";
import {
PANEL_COLLAPSE_TRANSITION_CLASS,
PANEL_RESIZE_HIT_AREA_MARGINS,
PANEL_RESIZE_HANDLE_LAYER_CLASS,
PANEL_RESIZE_HIT_TARGET_CLASS,
} from "./panelTransitionTokens";
Expand Down Expand Up @@ -67,10 +67,7 @@ import {
useDiffFilesCollapseControls,
} from "./git-diff/diffFilesStore";
import { buildGitDiffIdentity } from "./git-diff/gitDiffPanelHelpers";
import {
type SecondaryPanelDraggingHandler,
useSecondaryPanelResize,
} from "./useSecondaryPanelResize";
import { useSecondaryPanelResize } from "./useSecondaryPanelResize";
import { threadSecondaryPanelResizingAtom } from "./threadSecondaryPanelAtoms";
import { GitDiffToolbar } from "./GitDiffToolbar";
import { GitDiffTabContent } from "./ThreadSecondaryPanelTabContent";
Expand Down Expand Up @@ -275,26 +272,16 @@ function ThreadSecondaryPanelContent({
handleSecondaryPanelWidthChange,
} = useResponsiveGitDiffPanelDisplay({ isSecondaryPanelOpen: isOpen });
const {
handleSecondaryPanelDragging: handleResizeDragging,
handleSecondaryPanelResize,
handleSecondaryPanelResizePointerDownCapture,
resizeHitTargetRef,
persistedWidthPercent,
secondaryPanelRef: panelRef,
secondaryResizablePanelRef: resizablePanelRef,
} = useSecondaryPanelResize({
isSecondaryPanelOpen: isOpen,
onPanelWidthChange: handleSecondaryPanelWidthChange,
onResizeStart: handleSecondaryPanelResizeStart,
});
const handleSecondaryPanelDragging: SecondaryPanelDraggingHandler =
useCallback(
(isDragging) => {
if (isDragging) {
handleSecondaryPanelResizeStart();
}
handleResizeDragging(isDragging);
},
[handleResizeDragging, handleSecondaryPanelResizeStart],
);
const hasPanelExpandedRef = useRef(false);
useLayoutEffect(() => {
hasPanelExpandedRef.current = false;
Expand Down Expand Up @@ -1029,8 +1016,7 @@ function ThreadSecondaryPanelContent({
isOpen={isOpen}
isConversationCollapsed={isConversationCollapsed}
matchesSplitDividers={hostLayout !== null}
onDragging={handleSecondaryPanelDragging}
onPointerDown={handleSecondaryPanelResizePointerDownCapture}
hitTargetRef={resizeHitTargetRef}
/>
<Panel
ref={resizablePanelRef}
Expand Down Expand Up @@ -1153,26 +1139,22 @@ interface SecondaryPanelResizeHandleProps {
isOpen: boolean;
isConversationCollapsed: boolean;
matchesSplitDividers: boolean;
onDragging: SecondaryPanelDraggingHandler;
onPointerDown: (event: PointerEvent) => void;
hitTargetRef: RefObject<HTMLSpanElement | null>;
}

function SecondaryPanelResizeHandle({
isOpen,
isConversationCollapsed,
matchesSplitDividers,
onDragging,
onPointerDown,
hitTargetRef,
}: SecondaryPanelResizeHandleProps) {
const isResizing = useAtomValue(threadSecondaryPanelResizingAtom);
return (
<PanelResizeHandle
id="thread-detail-secondary-panel-handle"
disabled={!isOpen || isConversationCollapsed}
onDragging={onDragging}
onPointerDownCapture={(event) => onPointerDown(event.nativeEvent)}
data-panel-resize-snap-handle=""
hitAreaMargins={PANEL_RESIZE_HIT_AREA_MARGINS}
hitAreaMargins={{ coarse: 0, fine: 0 }}
className={cn(
"group relative shrink-0 overflow-visible transition-[width,opacity,background-color]",
PANEL_RESIZE_HANDLE_LAYER_CLASS,
Expand All @@ -1198,6 +1180,7 @@ function SecondaryPanelResizeHandle({
>
<span
aria-hidden
ref={hitTargetRef}
data-panel-resize-hit-target=""
className={PANEL_RESIZE_HIT_TARGET_CLASS}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export function usePanelCollapseTransitionsReady(
return !enabled || readyKey === resetKey;
}

export const PANEL_RESIZE_HIT_AREA_MARGINS = { coarse: 15, fine: 8 };

export const PANEL_RESIZE_HANDLE_LAYER_CLASS = "z-[25]";

export const PANEL_RESIZE_HIT_TARGET_CLASS =
"absolute inset-y-0 left-1/2 z-10 w-3 -translate-x-1/2 touch-none cursor-col-resize bg-transparent";
"absolute inset-y-0 left-1/2 z-10 w-4 -translate-x-1/2 touch-none cursor-col-resize pointer-coarse:w-8 bg-transparent";
Loading
Loading