Skip to content

fix(tab-group): keep a window-drag handle when tabs fill the strip - #33988

Merged
nwparker merged 1 commit into
stablyai:mainfrom
mousepotato03:fix/tab-strip-window-drag-area
Nov 11, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
mousepotato03:fix/tab-strip-window-drag-area

Conversation

@mousepotato03

@mousepotato03 mousepotato03 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

You move the Orca window by grabbing its top row. When the side panels are closed and you open lots of tabs, the tabs fill that whole row and there is nowhere left to grab. This keeps a small empty slot next to the tabs so the window can always be grabbed there.

What Changed

  • TabGroupPanel.tsx: while the right sidebar is closed, the top-right tab strip renders a 40px (w-[40px]) spacer after the tab bar. It uses the same reserveClosedExplorerToggleSpace && !rightSidebarOpen condition as the existing reservation for the floating explorer toggle, and the same 40px width.
  • The spacer has no -webkit-app-region of its own, so it inherits the strip's drag region. The tab bar wrapper is flex-1 min-w-0, so it gives up 40px and the tab list starts scrolling a little earlier instead of covering the drag area.
  • New E2E spec tests/e2e/tab-strip-window-drag-handle.spec.ts.

Before: with a full strip, the widest draggable run inside the strip is 9px. After: there is always a run of at least 40px between the "+" button and the action buttons.

Nothing changes when the tabs fit (the slot sits inside whitespace that already exists) or when the right sidebar is open (its header is already a drag area, so the spacer is not rendered).

Why

The strip has [tab list][+][whitespace][actions], and the whitespace is the only part that drags the window. flex-[0_1_auto] lets the tab list take all of it before overflowing, so a full strip leaves no handle near the window controls.

Alternatives considered:

  • A setting: no reason to make it optional. The cost is 40px of tab-strip width, only while the right sidebar is closed.
  • Reserving space in every top-edge strip (split layouts): costs tab width in panes that don't need it. One handle at the top-right, where a native title bar is usually grabbed, is enough.
  • Shrinking tabs or adding a separate title row: bigger visual changes for every user.

Relation to #17425 / #17426 / #27429: those cover the first press being swallowed while a terminal is focused (#6301). This PR does not touch that rule. The new slot inherits the strip's region, so it follows the same focus behavior as the rest of the strip. If #27429 lands, the slot drags on the first press as well. No file overlap with #27429; #17426 also touches TabGroupPanel.tsx, but only the strip's marker attribute a few lines above this change.

Linked Issue

Fixes #33979

Visual Proof

Title row with the tab strip full, both sidebars closed, 1280px wide (hidden renderer screenshots). The red box marks the same area in both: before, the tabs push "+" into it and nothing there drags; after, it is the empty drag slot.

Before After
before-annotated after-annotated

This is a hit-testing change, so the screenshots only show where the slot is. The table below and the E2E spec measure whether the area is actually draggable.

Measured on main 351705b by resolving -webkit-app-region for every pixel column of the title row (terminal not focused):

Scenario Draggable px before Draggable px after
Few tabs, sidebars closed 692 692 (identical segments)
Full strip, sidebars closed 84 (widest run in strip: 9) 125 (new 46px run next to "+")
Full strip, both sidebars open 373 373 (spacer not rendered)

Testing

  • tests/e2e/tab-strip-window-drag-handle.spec.ts fails on main (Expected: >= 40, Received: 9) and passes with this change. Run with ORCA_BACKGROUND_LAUNCH=1 pnpm run test:e2e tests/e2e/tab-strip-window-drag-handle.spec.ts.

  • pnpm check:changed --maxWorkers=2 --base=upstream/main (format, lint, typecheck, affected tests, ratchets): 23/23 checks pass.

  • Manual, Windows 11: with both sidebars closed and the strip full, the window can't be dragged from the tab row on installed 1.4.239; on this branch (pnpm dev) it drags from the new slot between "+" and the action buttons.

  • Not tested locally: macOS and Linux. The change is plain flex layout with no platform branch. On macOS, --window-controls-width is 0px (no custom window controls), so the existing reservation shrinks to 40px and the new slot still sits next to the tabs.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

Investigated, implemented and tested with Claude Code (Claude Opus 5.5). I verified the drag behavior on Windows 11 myself.

Review

  • Cross-platform: layout only, no platform-specific code. Windows/Linux window controls and the macOS traffic lights keep their existing reservations.
  • SSH/remote: renderer chrome only, no runtime or wire changes.
  • Mobile: N/A, mobile has no window title bar.
  • Folder workspaces: same tab strip, no git assumptions.
  • Performance: one static element, rendered only while the right sidebar is closed.
  • Security: none.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Security, cross-platform, SSH/remote, mobile, backwards compatibility and performance are covered under Review above.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

When the right sidebar is closed and closed-explorer space is reserved, the panel adds a spacer to the attached tab strip and uses that condition for the no-drag area. An end-to-end test closes both sidebars, overflows the tab strip, and checks that its widest contiguous draggable region is at least 40 pixels.

Severity of issue fixed: Medium

Merge Risk: Low · up to 73360

With the right sidebar closed, a very narrow rightmost split may clip the pane-actions button because of the new 40px drag spacer. This only affects an edge-case layout, so it is mergeable with a small follow-up.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: preserving a window-drag handle when the tab strip is full.
Description check Passed The description is mostly complete and explains the user impact, implementation, rationale, linked issue, visual proof, testing, platform coverage, and review considerations. The template's explicit R…
Linked Issues check Passed Issue [#33979] requires a window-drag area when the tab strip overflows, the workspace sidebar is collapsed, and the right sidebar is closed. TabGroupPanel.tsx renders a w-10 shrink-0 spacer when …
Out of Scope Changes check Passed The changes are limited to the tab-strip layout and an E2E test for the linked drag-handle issue. The spacer uses the existing sidebar condition. The changes do not modify the separate terminal first-…
Full details: Description check

Explanation

The description is mostly complete and explains the user impact, implementation, rationale, linked issue, visual proof, testing, platform coverage, and review considerations. The template's explicit Risk section and Level field are missing, although related risk information appears under Review.

Full details: Linked Issues check

Explanation

Issue [#33979] requires a window-drag area when the tab strip overflows, the workspace sidebar is collapsed, and the right sidebar is closed. TabGroupPanel.tsx renders a w-10 shrink-0 spacer when reserveClosedExplorerToggleSpace && !rightSidebarOpen. The tab bar remains flex-1 min-w-0, so overflow occurs before the spacer. The new E2E test creates 14 tabs, verifies overflow, clears terminal focus, and requires a draggable strip run of at least 40 pixels.

Full details: Out of Scope Changes check

Explanation

The changes are limited to the tab-strip layout and an E2E test for the linked drag-handle issue. The spacer uses the existing sidebar condition. The changes do not modify the separate terminal first-press behavior.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@nwparker
nwparker force-pushed the fix/tab-strip-window-drag-area branch from 3c96ce6 to 7336024 Compare November 11, 2026 21:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5f818356-6ec0-4482-a89f-cea4e4efe066
Commits

Reviewing files that changed from the base of the PR and between 3c96ce6 and 7336024.

Files selected for processing: 1

  • src/renderer/src/components/tab-group/TabGroupPanel.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

) : null}
<div className="min-w-0 flex-1 h-full">{tabBar}</div>
{/* Why: overflowing tabs eat all strip whitespace; keep a window-drag handle while the right sidebar header is closed. */}
{reserveRightTitlebarSpace ? <div className="w-10 shrink-0" /> : null}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Supported by static analysis

Script executed:

#!/bin/bash
rg -n -C 3 -- 'minSize|minWidth|minimumSize|window-controls-width|TabGroupPanel' src/renderer/src/components/tab-group src/renderer/src

Repository: stablyai/orca

Length of output: 41810


Script executed:

#!/bin/bash
cat -n src/renderer/src/components/tab-group/TabGroupPanel.tsx | sed -n '35,105p;220,350p'
cat -n src/renderer/src/components/tab-group/TabGroupSplitNodeTree.tsx | sed -n '1,280p'
cat -n src/renderer/src/components/tab-group/TabGroupPaneActionsMenu.tsx | sed -n '1,75p'
git diff 576a6c93420d2f07dd8fb924916cbc5612b8dea4 7336024865909bf932274a4cfd96c62c5ab13c42 -- src/renderer/src/components/tab-group/TabGroupPanel.tsx
rg -n --glob '*.{ts,tsx,css}' -e 'MIN.*(GROUP|SPLIT|PANE)' -e 'clamp.*[Rr]atio' -e 'min-w-' src/renderer/src/components/tab-group src/shared | sed -n '1,180p'

Repository: stablyai/orca

Length of output: 30849


Script executed:

#!/bin/bash
rg -n -F -- 'TabBarQuickCommandsButton' src/renderer/src/components
rg -n --glob '*.{ts,tsx}' -e 'splitTabGroup' -e 'splitGroup' -e 'split.*[Gg]roup' src/renderer/src/components/tab-group src/renderer/src/store/workspace-layout src/shared/workspace-layout | sed -n '1,150p'
rg -n -F -- 'windowControlsWidth' src/renderer/src/App.tsx src/renderer/src | sed -n '1,80p'

Repository: stablyai/orca

Length of output: 16998


Script executed:

#!/bin/bash
cat -n src/renderer/src/components/tab-bar/TabBarQuickCommandsButton.tsx | sed -n '30,70p;135,200p'
rg -n -F -e 'window-controls-width' -e 'reserveClosedExplorerToggleSpace' src/renderer/src/App.tsx src/renderer/src/components/AppWorkspaceShell.tsx src/renderer/src/components/tab-group
rg -n -F -- 'AppWorkspaceShell' src/renderer/src | sed -n '1,20p'
cat -n src/shared/workspace-layout/tab-group-moves.ts | sed -n '90,170p'

Repository: stablyai/orca

Length of output: 9006


Script executed:

#!/bin/bash
rg -n -C 5 -F -e 'window-controls-width' -e 'rightSidebarOpen' src/renderer/src/app-shell/AppWorkspaceShell.tsx
rg -n -F -- 'WINDOW_CONTROLS_WIDTH' src/renderer/src src/shared
cat -n src/renderer/src/components/tab-group/TabGroupSplitNodeTree.tsx | sed -n '274,350p'

Repository: stablyai/orca

Length of output: 3115


Keep pane actions visible in narrow splits.

When the rightmost split is narrow, the fixed 40px spacer can push the pane-actions button beyond the panel’s clipped edge. Make the spacer adapt to narrow panels while retaining the 40px drag area when space permits.

@nwparker
nwparker merged commit b139563 into stablyai:main Nov 11, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: No window drag area next to the tabs once the tab strip is full

2 participants