fix(desktop): invert window-drag regions so chrome stays clickable, add drag strips to uncovered screens
Summary
Users could no longer click the topbar (pane tab bar) or right-sidebar chrome in v2 workspaces. Root cause: since #5824 the chrome bars are marked drag (Electron window-drag region) with no-drag carve-outs on interactive children — and Chromium loses those carve-outs when they sit inside masked/scrollable wrappers (OverflowFadeContainer) or CSS-zoomed wrappers (ZoomStable), turning the entire bar into a drag surface that swallows clicks.
This PR inverts the scheme everywhere: drag lives only on dedicated empty leaf elements (traffic-light spacers, flex fillers), never on containers with interactive children. Worst-case failure flips from "all controls dead" to "an empty sliver isn't draggable".
packages/panesTabBar: root no longer draggable; empty filler right of tabs carriesdrag. Also removed the zero-tab special-case branch so an empty bar renders identically to a populated one.- TopBar, DashboardSidebarHeader, settings header: same inversion (spacer + filler replace container
drag+ carve-outs), geometry-preserving. - PRActionHeader (v2 right sidebar): gained a drag filler — previously the sidebar had no drag surface at all.
- Drag-less full-bleed screens now have top drag strips: v2 workspace state screens (not-found / creating / create-error / host-incompatible / missing-worktree / loading, via new
StateScreenShell), auth-pending and offline screens, AuthProvider hydration splash, create-organization page. - TiptapPromptEditor: bare Cmd/Ctrl+Arrow (incl. Shift selection) always stays in the editor for line navigation; only Alt chords that resolve to a real hotkey bubble — app hotkeys fire in contenteditable and would otherwise preventDefault the cursor move.
- AGENTS.md: documented the "drag on empty leaves only" rule.
Test Plan
- v2 workspace with tabs: tabs, + button, run button, right-sidebar toggle all clickable; empty tab-bar area drags the window
- Right sidebar: PR action header background drags the window; open-in/PR buttons clickable
- Sidebar header strip and settings header: buttons clickable, empty areas drag — including at non-100% page zoom
- Worktree-missing / workspace-not-found / creating screens: top strip drags the window
- Launch splash and session-restoring screens: top strip drags the window
- Chat input: ⌘←/→ moves cursor to line start/end, ⇧⌘←/→ selects, ⌘⌥←/→ still switches tabs
https://claude.ai/code/session_01FicLuUF7gtWzs1XGu9ePwM
Summary by cubic
Fixes dead clicks in the top bar and sidebar by moving Electron window-drag regions to empty, non-interactive elements. Also adds drag strips to state screens so the window stays draggable when the tab bar/top bar isn’t shown.
- Bug Fixes
- Moved drag to empty leaves across chrome:
TopBar,DashboardSidebarHeader, settings header, andpackages/panesTabBar(removed zero-tab special case). Controls remain clickable even inside masked/scrollable or zoomed wrappers. - Added missing drag surfaces: a drag filler in the v2 right sidebar
PRActionHeader, plus top drag strips for v2 workspace state screens (not-found/creating/host-incompatible/missing-worktree/loading), auth-pending and offline screens, hydration splash, and create-organization. TiptapPromptEditor: keep Cmd/Ctrl+Arrow (and Shift variants) inside the editor for line navigation; let Alt-resolved chords (e.g., Cmd+Opt+←/→) bubble to app hotkeys.- Documented the “drag on empty leaves only” rule in
apps/desktop/AGENTS.md.
- Moved drag to empty leaves across chrome:
Summary by CodeRabbit
-
Bug Fixes
- Improved window dragging across top bars, sidebars, settings, authentication, and workspace screens without interfering with interactive controls.
- Preserved text selection for error messages and improved keyboard navigation with modifier keys.
- Ensured tab bars maintain proper drag behavior, including when no tabs are present.
-
UI Improvements
- Added consistent layout treatment for workspace loading, missing, creation, and error states.
- Improved drag-region spacing on desktop and workspace headers.