mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 10:59:32 +01:00
#538's by-state header strip lines its labels up in a column measured into --tab-triage-gutter by _sizeTabTriageGutter(). Under 600px mobile.css hides the headings (the phone row keeps its chips, no labels), but the sizer measured them anyway: every part was 0 wide, yet `width + 5 * (parts - 1)` made each labelled heading 5, so the "nothing to size" guard never tripped, the column became 15px and the group key was cached as if measured. A phone turned to landscape (>= 768px) or a foldable opened (Find N5: folded under 600, unfolded 1124 wide) then crossed into the wrapping strip with no tab render behind it (the resize handler only calls updateTabOverflowMode()), the key had not changed, and "WAITING 2" sat in a 15px column on top of the first tab of its row. Only the wrapping strip reads the column, so the sizer now measures nothing and forgets its key while the strip does not wrap, counts only parts that are laid out (a hidden heading sizes and keys nothing), and updateTabOverflowMode() calls it right after deciding the wrap. Phones and tablets therefore never measure (no layout read per render pass), and every flip into the wrapping strip, the 768px breakpoint included, measures afresh. The 600px breakpoint only matters below 768px, where nothing is measured. Tests in test/tab-triage.test.ts pin that hidden headings size and key nothing, that the real updateTabOverflowMode() measures on the unfold with no render, and that wrapping again re-measures with the counts unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>