From 316b1887fd287dd59606e5fbfe20638f0e14b71c Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Mon, 26 Oct 2026 16:51:33 -0700 Subject: [PATCH] Size tabs to titles and preserve floating panel drag space (#34025) * Size tabs to titles and preserve floating panel drag space * Stabilize agent tab layout during activity changes * Balance tab widths across titles and tab types * Reserve terminal tab icon space before agent detection * Run floating header drag E2E in the isolated headful project * Prevent native text selection on the floating panel drag handle * Cap expanded tab width at 24rem * Let tabs expand to fit titles in available space --- .../FloatingTerminalPanelSurface.tsx | 6 + .../src/components/tab-bar/BrowserTab.tsx | 4 +- .../tab-bar/ClientHostedBrowserTab.tsx | 4 +- .../src/components/tab-bar/EditorFileTab.tsx | 4 +- .../src/components/tab-bar/SortableTab.tsx | 4 +- .../tab-bar/TabBar.context-menu.test.ts | 5 +- .../src/components/tab-bar/TabBar.fixture.tsx | 167 +++++++++++++++ .../src/components/tab-bar/TabHoverCard.tsx | 2 +- .../tab-bar/TerminalTabLeadingIcon.tsx | 14 +- .../tab-bar/tab-title-tooltip.test.tsx | 8 +- .../src/components/tab-bar/tab-width-rules.ts | 6 +- .../floating-workspace-pane-height.spec.ts | 190 +++++++++++++++--- tests/e2e/tab-strip-active-dock.spec.ts | 166 +++++++++++++++ 13 files changed, 526 insertions(+), 54 deletions(-) create mode 100644 src/renderer/src/components/tab-bar/TabBar.fixture.tsx diff --git a/src/renderer/src/components/floating-terminal/FloatingTerminalPanelSurface.tsx b/src/renderer/src/components/floating-terminal/FloatingTerminalPanelSurface.tsx index 0b7563f55f5..5a3f2b34a51 100644 --- a/src/renderer/src/components/floating-terminal/FloatingTerminalPanelSurface.tsx +++ b/src/renderer/src/components/floating-terminal/FloatingTerminalPanelSurface.tsx @@ -181,6 +181,12 @@ export function renderFloatingTerminalPanelSurface({ tabStripChrome="floating-panel" /> + {/* Keep a grab area even when the tab strip overflows. */} +