Repository navigation
fix(app): keep overflowing session tabs usable - #61397
yushui2022 wants to merge 1 commit into
Conversation
Horizontal session tabs could shrink to 28px icon chips once the strip overflowed, leaving no reliable way to click a tab to switch. Keep tabs at a usable minimum width, scroll the strip horizontally with the wheel, and reveal the selected tab when a shortcut changes it.
There was a problem hiding this comment.
The fix works. I ran tabs.spec.ts in headless Chromium. On the base, the new overflow test fails: with 14 sessions in an 800px window, every tab shrinks to an avatar with no title. With this change, tabs keep an 80px minimum with their titles showing, the strip scrolls, and all 45 tests in the file pass. typecheck:tsc for packages/app passes.
The public API is unchanged; this only affects the app's UI.
One non-blocking point: the deleted test icon-only inactive tabs retain their avatar and attention badge… also checked that an inactive tab shows the unread/attention dot and clears it on selection. Avatar-only horizontal tabs can't happen any more, so dropping that test makes sense. But no test now covers the dot on inactive horizontal tabs, so a short assertion for it in the new test or elsewhere would be worth keeping.
|
Thanks for verifying the change and for the typecheck run. On the dot coverage: the existing The part that is no longer reachable is only the avatar-corner |


Issue for this PR
Closes #61396
Type of change
What does this PR do?
When the top horizontal session tab strip overflowed, every tab was allowed to shrink to 28px (
min-w-7), so the strip became a row of icon slivers with no reliable click-to-switch target. This keeps horizontal tabs at a usable minimum width (min-w-20, 80px) and lets the strip scroll horizontally instead. A vertical wheel gesture now scrolls the strip horizontally, and when a shortcut or number key selects a tab the strip scrolls that tab into view.scrollIntoViewalso usesblock: "nearest", inline: "nearest"so selecting a tab no longer scrolls unrelated ancestors.How did you verify your code works?
Added an e2e regression in
packages/app/e2e/regression/tabs.spec.tscovering: 14 tabs keep an 80px minimum width and the strip overflows, a vertical wheel scrolls it, clicking an off-screen tab switches to it, andCmd/Ctrl+9reveals the tab it selects. The test passes locally.bun run typecheck, Prettier and oxlint pass for the touched files. The rest oftabs.spec.tspasses except five tests that also fail on unmodifieddevon this macOS machine (they hardcodeControl+Altwhilemodis Command, and one asserts Linux keybind labels), so they are unrelated to this change.Visual
Screenshots / recordings
No screenshot: the visible change is that tabs stop shrinking below 80px and the strip scrolls when it overflows.
Checklist
Added by the opencode bot (AI-generated).
Fixes #50196
Related: #53412