Files
Jinjing 2434a63be9 fix(tab-group): keep a grabbable tab in narrow tab-group strips (#41249)
* fix(tab-group): keep a grabbable tab in narrow tab-group strips

Tabs were the only shrinkable item in a pane's strip, and the only drag
source, so a narrow pane clipped them to 0px while +, quick commands, the
pane-actions menu and the reserved window-chrome spacers kept their width.
Give the tab area a 40px floor and let the action chrome clip before it.

* test(tab-group): open the right sidebar so the narrow-strip e2e is platform-neutral

* test(tab-group): assert the dragged tab moves between strips in the DOM

* fix(tab-group): hide strip actions whole instead of clipping their focus targets

Narrow strips clipped the new-tab, quick-command and pane-actions buttons
behind the 40px tab floor, so Tab could focus a control that was mostly or
entirely out of view. Measure the room left after the reserved spacers and
drop each control whole, and so out of Tab order, below the width where it
fits: quick commands first, then pane actions, then new tab (groups with a
tab only). Close split pane stays in every tab's context menu.

The e2e now measures only pixels that start a tab drag (not the close
button), drags from that run, and walks the strip with Tab at normal and
narrow widths, asserting every focused control is fully visible.

* fix(tab-group): offer quick commands from pane actions when the strip hides them

When a narrow strip folds the quick-command button away, the pane actions
menu now carries the same Quick Commands submenu the terminal and chat
menus use, so running or adding a command still works from the strip.

The narrow-strip e2e no longer sleeps or casts: it retries the first Tab
until focus lands in the strip, and a new test checks the menu offers quick
commands only when the button is hidden.

* fix(tab-group): drop the window-drag gap before strip controls clip

With the right sidebar closed, the 40px window-drag gap only shrank after
the tab bar hit its floor, so "+" and the actions clipped behind it while
the width rules said they fit. Hide the gap below the width where it and
every control fit, so the existing thresholds hold.

Adds an e2e that sweeps the top-right strip with the right sidebar closed
and asserts no focused strip control is clipped.
2026-11-12 13:41:50 -08:00
..