You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split-drag drop zones for a single pane are measured against <main>, so they change with the right panel #3481
In a single-pane workspace, dragging a thread from the left sidebar onto the chat pane splits or replaces depending on whether the right panel is open. With the right panel closed, dropping in the middle of the chat shows Replace this chat and replaces the open chat. With the right panel open, dropping at the same visible spot shows Split left and splits. The drop zone should depend only on where you drop inside the chat pane, not on the right panel.
Single-pane thread view, right secondary panel (⌘J)
Reproduced against main at fa1f44ebe9e5676004b669e48c99b3c7606466b6, and against the running 0.42.1 web bundle served by the desktop app on http://127.0.0.1:38886
Steps to reproduce
Open a thread so there is exactly one pane.
Open the right panel (⌘J). The visible chat column is now about half the window.
Drag another thread from the left sidebar and drop it on the visual center of the chat column → overlay reads Split left; a split is created.
Close the right panel (⌘J).
Drag a thread and drop it on the visual center of the chat (now the full width) → overlay reads Replace this chat; the current chat is replaced.
Did not reproduce with two or more panes: each pane carries data-split-pane-id, so the zone is measured against the pane rect.
Expected vs actual
Actual (measured by driving the running UI with Playwright and reading the [data-split-drag-label] overlay text and bb.splitLayout):
panel CLOSED, visible center x=881 (50% of <main>): overlay Replace this chat → replace
panel OPEN, visible center x=601 (25% of <main>): overlay Split left → split
Expected: for the same relative drop inside the chat pane, the result is identical with the right panel open or closed.
Evidence
The single-pane chat region is not tagged with data-split-pane-id, so the drag falls back to the whole <main>; in the inline single-pane layout <main> also contains the right panel as a sibling react-resizable-panels panel.
The multi-pane branch of SplitThreadArea wraps each pane in data-split-pane-id (#L759), but the single-pane branch (#L605-L626) renders the pane content without a tagged wrapper:
In the inline single-pane layout, SecondaryPanelLayout renders a PanelGroup whose chat Panel and right secondary Panel are siblings (#L326-L359); the chat content div (#L298-L312) has no pane id:
return{zone: "center",label: "Already open — focus pane"};
}
if(atMaxPanes){
return{zone: "center",label: "Replace this chat"};
}
return{
zone,
label: zone==="center" ? "Replace this chat" : `Split ${zone}`,
};
Measured with getBoundingClientRect() in the running app: <main> is x=320 w=1120 with the right panel both open and closed, while the visible chat column is the left ~560px (the panel starts at x≈881). The zone divides by 1120, not by the visible chat width.
Still happens on main at fa1f44ebe9e5676004b669e48c99b3c7606466b6.
Not provider-specific; this is pure UI geometry with no agent involved.
Single-pane only; with ≥2 panes the per-pane data-split-pane-id rect is used and the zones are correct.
Suggested priority and effort
Medium — hits the common single-pane + right-panel workflow and makes the drop result depend on an unrelated panel; workaround is to aim at the pane edge. Effort: Low.
Prototype (fork; not a PR — CONTRIBUTING requires sign-off first)
Two commits on elb-comt/bb:fix/single-pane-split-drop-target:
Tag the inline pane content (the chat column, which excludes the right panel) with data-split-pane-id so zones are measured against the pane that owns them; behavior then no longer depends on the right panel.
Optional UX follow-up: when the workspace has exactly one pane, a center drop splits to the right instead of replacing, since dragging a thread in is the common "add a pane" gesture and replace is also reachable by clicking the thread.
Summary
In a single-pane workspace, dragging a thread from the left sidebar onto the chat pane splits or replaces depending on whether the right panel is open. With the right panel closed, dropping in the middle of the chat shows
Replace this chatand replaces the open chat. With the right panel open, dropping at the same visible spot showsSplit leftand splits. The drop zone should depend only on where you drop inside the chat pane, not on the right panel.Versions and environment
/Applications/bb.app), macOS (arm64)mainatfa1f44ebe9e5676004b669e48c99b3c7606466b6, and against the running 0.42.1 web bundle served by the desktop app onhttp://127.0.0.1:38886Steps to reproduce
Split left; a split is created.Replace this chat; the current chat is replaced.Did not reproduce with two or more panes: each pane carries
data-split-pane-id, so the zone is measured against the pane rect.Expected vs actual
Actual (measured by driving the running UI with Playwright and reading the
[data-split-drag-label]overlay text andbb.splitLayout):<main>): overlayReplace this chat→ replace<main>): overlaySplit left→ splitExpected: for the same relative drop inside the chat pane, the result is identical with the right panel open or closed.
Evidence
The single-pane chat region is not tagged with
data-split-pane-id, so the drag falls back to the whole<main>; in the inline single-pane layout<main>also contains the right panel as a siblingreact-resizable-panelspanel.apps/app/src/components/sidebar/useThreadRowSplitDrag.ts#L33setsMAIN_CONTENT_SELECTOR = "main", andsinglePaneFallback()(#L128-L142) returnscontainer: document.querySelector("main"):bb/apps/app/src/components/sidebar/useThreadRowSplitDrag.ts
Lines 128 to 142 in fa1f44e
SplitThreadAreawraps each pane indata-split-pane-id(#L759), but the single-pane branch (#L605-L626) renders the pane content without a tagged wrapper:bb/apps/app/src/views/thread-detail/SplitThreadArea.tsx
Lines 605 to 626 in fa1f44e
SecondaryPanelLayoutrenders aPanelGroupwhose chatPaneland right secondaryPanelare siblings (#L326-L359); the chat contentdiv(#L298-L312) has no pane id:bb/apps/app/src/components/secondary-panel/SecondaryPanelLayout.tsx
Lines 326 to 359 in fa1f44e
EDGE_X_FRACTION = 0.28(zones.ts#L17), so 25% of<main>is "left" and 50% is "center":bb/apps/app/src/lib/split-drag/zones.ts
Lines 90 to 104 in fa1f44e
getBoundingClientRect()in the running app:<main>isx=320 w=1120with the right panel both open and closed, while the visible chat column is the left ~560px (the panel starts at x≈881). The zone divides by 1120, not by the visible chat width.What you ruled out
mainatfa1f44ebe9e5676004b669e48c99b3c7606466b6.data-split-pane-idrect is used and the zones are correct.Suggested priority and effort
Medium — hits the common single-pane + right-panel workflow and makes the drop result depend on an unrelated panel; workaround is to aim at the pane edge. Effort: Low.
Prototype (fork; not a PR — CONTRIBUTING requires sign-off first)
Two commits on
elb-comt/bb:fix/single-pane-split-drop-target:data-split-pane-idso zones are measured against the pane that owns them; behavior then no longer depends on the right panel.