fix(web): restore horizontal scrolling in right panel tabs
Problem
The right panel tab strip doesn't scroll horizontally in the desktop app. Once the tabs overflow, the ones past the right edge can't be reached unless you widen the panel or close tabs. Trackpad and wheel do nothing over the strip.
Before
https://github.com/user-attachments/assets/243057fe-7905-4754-bf35-47ed5be0cabf
After
https://github.com/user-attachments/assets/f38dfb0b-1c77-46e5-9be1-08b967c0c102
Cause
c2d44a31 ("Unify compact subheaders and diff file navigation") moved drag-region off the topbar container in RightPanelTabs.tsx and onto the tab strip's ScrollArea:
- ownsDesktopTitleBar && "drag-region wco:pr-[...]", // topbar container
+ ownsDesktopTitleBar && "wco:pr-[...]",
...
- className="min-w-0 flex-1 rounded-none"
+ className={cn("min-w-0 flex-1 rounded-none", ownsDesktopTitleBar && "drag-region")}
-webkit-app-region: drag hands the area to the window manager, so the element stops getting pointer and wheel events. Putting it on the scroll container is what kills the scroll. Browser builds were never affected, since ownsDesktopTitleBar is isElectron && mode === "inline".
Fix
Drag region goes back on the topbar container, the ScrollArea gets [-webkit-app-region:no-drag]. Same split DiffPanelShell and the chat header already use: the container drags, the interactive children opt out.
The tradeoff is that you can no longer drag the window by the empty space inside the tab strip. The container padding on both sides becomes draggable instead, which it wasn't before, and that empty space only exists when the tabs fit, which is exactly when nobody needs to scroll.
RightPanelTabs was the only drag region in the app wrapping a scroll container. The others (SidebarChrome, NoActiveThreadState, settings, ChatView, DiffPanelShell) wrap buttons and labels, which the .drag-region button rule in index.css already excludes.
Test
RightPanelTabs.test.tsx renders the component with isElectron mocked true and checks that the drag region sits on the topbar and not on the scroll container. It fails on the pre-fix component.
Also ran vp test run src/components/RightPanelTabs.test.tsx and tsgo --noEmit in apps/web, vp lint, and the desktop app on macOS for the videos above.
8 changed lines in the component, plus the test.
[!NOTE] Low Risk Small Electron-only CSS/class change for titlebar drag vs scroll, with a focused unit test and no auth or data-path impact.
Overview Fixes horizontal tab scrolling in the Electron desktop app when the right panel owns the title bar.
RightPanelTabsmovesdrag-regionback onto the topbar (data-right-panel-tabbar) and applies[-webkit-app-region:no-drag]on the tab stripScrollAreainstead of putting drag on the scroll container—matchingDiffPanelShell/ chat header so wheel and pointer events reach the scroller.Adds
RightPanelTabs.test.tsx(SSR markup withisElectronmocked) to assert drag stays on the tabbar and the tab list opts out of drag.Reviewed by Cursor Bugbot for commit 3e7fb5abae0b2c74e09b8365020d57e1e870e240. Bugbot is set up for automated code reviews on this repo. Configure here.
[!NOTE]
Fix horizontal scrolling in
RightPanelTabsscroll area when Electron title bar is activeIn Electron inline mode, the tab bar container was applying
drag-regionto the scroll area, which blocked pointer and wheel events needed for horizontal scrolling. The fix movesdrag-regionto the outer container and applies[-webkit-app-region:no-drag]to theScrollAreainstead, allowing the tab list to receive scroll events while the surrounding bar remains draggable. A new test in RightPanelTabs.test.tsx verifies both classes are applied to the correct elements.Macroscope summarized 3e7fb5a.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
ae8e82a0-556c-4ed1-8100-e152a8c14665You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- [ ] 🔍 Trigger review
Comment @coderabbitai help to get the list of available commands.
Approvability
Verdict: Approved at 7501b44
Macroscope's review found this PR approvable — This is a focused Electron inline-mode UI fix that restores tab scrolling while retaining window dragging on unused title-bar space. The production scope is isolated, existing non-Electron paths are unchanged, and a regression test covers the new structure.
You can add or adjust custom eligibility rules. Learn more.
[!NOTE] 🤖 GPT-6 Astra (preview) responding on behalf of Theo
This was closed as part of an automated cleanup pass. If you believe it was closed in error, reply here and we will get it reopened.
Closing as superseded by #9461, which is on main. The tab strip now accepts wheel input and has scroll buttons when tabs overflow. The trailing window-drag spacer is a separate optional change, not a missing part of the scrolling fix.