fix: cap the first tab on every pass, before a selection widens it (#748)

selectSession() toggles .active at once while _syncTabStripCorner() only runs in
the debounced render, so a cap set after measuring left a newly selected first
tab wider than the room and dropped the first row below the toolbar until then.
max-width changes nothing on a narrower tab, so the cap is simply always on, and
the clear-before-measure and finish-the-animation loops go. The no-usable-room
test uses 8 tabs: at 40 the scroll fallback fires first and it passed at any
threshold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-11-04 16:48:57 +01:00
1 parent 823013226d
commit d9d6fad698
4 files changed
+24 -19

No files matched your search

+3 -3
View File
@@ -651,9 +651,9 @@ body {
margin: 0 2px var(--lineage-row-gap, 4px) 0;
}
/* A first tab wider than the room beside the toolbar (a selected one shows its
gear and close) has its name trimmed to fit, so the layout never depends on
which tab is selected. */
/* The first tab is capped to the room beside the toolbar: one wider than that (a
selected one shows its gear and close) has its name trimmed to fit, so the
layout never depends on which tab is selected. */
.session-tabs-host > .session-tabs.tabs-corner > .session-tab.tab-corner-fit {
max-width: var(--tab-corner-first-max, none);
}