feat(desktop): drag tabs and panes between the main area and the sidebar
What
Any tab or pane can be dragged between the main area and the right sidebar, in both directions, onto every drop target: the tab bar, a pane (split), or an empty area.
Why it was blocked
useRightPaneAreaLifecyclesubscribed to the main area and moved every pane that was not a terminal or chat back to the sidebar. A file, diff, browser or Pages tab dragged into the main area bounced straight back. Removed, with itsmoveViewerPanesToRighthelper. Its other branch only ran with the right-pane flag off, and the flag is hard-wired on.applyPaneLayoutOprefusedmove,moveToNewTabandswapinto the main area for the same kinds. Removed; the panes skill doc is updated.- An area with no tabs had no drop target. New
EmptyAreaDropZoneinpackages/panestakes a dropped tab or pane as the first tab. - A blank or failed browser pane's overlay is drawn outside the pane tree with
pointer-events-auto, so it swallowed every drop aimed at that pane. It now yields during a native drag, like the webview already did (data-pointer-passthrough-target).
Background agent browsers relied on the hook to land in the sidebar; openBackgroundBrowser now writes a new sidebar tab directly.
Verification
Before/after in the dev app over CDP, every drop on main and on this branch: https://app.superset.sh/page/drag-tabs-between-the-main-area-and-the-sidebar-be-6w9dx2
- Sidebar tab → main tab bar, sidebar tab → main pane split, sidebar pane header → main pane split: bounced back on
main, work here. - Main tab → blank sidebar browser pane split: swallowed on
main, works here. - Sidebar tab → empty main area: no target on
main, works here. - Drags were synthetic
DragEvents (CDP mouse input cannot start an HTML5 drag); the app's own drop handlers ran. No console errors. - Not covered: dragging diff/file/Changes/Pages panes, top/bottom splits.
Tests: applyPaneLayoutOp now asserts a diff pane can move into the main area; openBackgroundBrowser tests target the sidebar layout. Desktop and panes suites, typecheck, biome and check:plugins pass.
Summary by cubic
Lets any tab or pane be dragged between the main area and the right sidebar, in both directions, onto the tab bar, a pane split, or an empty area.
- Removed the lifecycle hook and pane-layout rule that forced files, diffs, browsers and Pages panes back to the sidebar; they now stay where dropped.
- Empty areas now accept a dropped tab or pane as their first tab.
- Blank or failed browser panes yield to in-flight drags so drops aimed at them reach the pane beneath.
- Background agent browsers now open as a sidebar tab directly instead of relying on the removed hook.
Summary by CodeRabbit
- New Features
- You can now drag panes and tabs into an empty workspace area to add them there.
- Background browser opens create new tabs in the sidebar without changing the main layout or active tab.
- Improvements
- Panes of any kind can now be moved or swapped into the main area.
- Pointer passthrough now applies to browser overlays as well as iframes.