Commit 5cf3f13
committed
fix(sessions): the label-collapse thresholds were too low, not just mis-commented
Review flagged the comments: they still said "a fifth button" and "five labelled
buttons ... ~300px" next to a row that now renders six. Correct — and going to
fix the wording turned up a real bug behind it.
MEASURED the shipped styling in headless Chrome, six labels rendered:
chat.html 434px padding 0 9px, 11.5px text, gap 6, 1px border
sessionsView.html 363px padding 0 8px, 11px text, gap 4, no border
The thresholds were 420 and 400. So chat.html had a 14px band — content widths
between 420 and 434 — where the labels were still painted and the nowrap row
spilled out of the card. Exactly the failure the guard was added to prevent,
reintroduced by raising the button count without re-measuring. Now 460 and 390,
both above the need with room for a wider system font.
The comments are rewritten with the real numbers and a note to re-measure when
adding a button.
The test is rewritten to assert the RELATIONSHIP rather than a regex shape. It
now parses the threshold and requires it to be >= the measured need, so a
seventh button fails until someone re-measures, and the message says why:
chat.html: labels collapse at 420px but six labelled buttons need 434px —
between those widths the labels paint and the nowrap row overflows the card
Boundary verified: 433 rejected, 434 accepted, and the 420 that shipped rejected.
All 32 suites green.1 parent 82e76fc commit 5cf3f13
3 files changed
Lines changed: 40 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1107 | 1107 | | |
1108 | 1108 | | |
1109 | 1109 | | |
1110 | | - | |
1111 | | - | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
1112 | 1115 | | |
1113 | | - | |
| 1116 | + | |
| 1117 | + | |
1114 | 1118 | | |
1115 | | - | |
| 1119 | + | |
1116 | 1120 | | |
1117 | 1121 | | |
1118 | 1122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | | - | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
221 | 220 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
229 | 237 | | |
230 | | - | |
231 | | - | |
232 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
233 | 244 | | |
234 | | - | |
| 245 | + | |
235 | 246 | | |
236 | 247 | | |
237 | 248 | | |
| |||
0 commit comments