Commit 6d17de5
committed
fix(chat): the composer stays put — the hidden speaker label was stretching the page
Past a conversation's first long turn, scrolling beyond the end of the transcript
moved the whole chat: transcript, composer and status row slid up together over a
blank page. The page is a 100vh shell and only #log is meant to scroll, so the
composer should never move at all.
The page itself had become scrollable. T4 (59777da) takes the speaker label —
"You" / "LevelCode AI" — off the screen and keeps it for screen readers, with the
usual rule for that: position: absolute, 1px, clipped. Nothing above the label
was positioned, so its containing block was the page, not the transcript. Each
label was laid out at its UNSCROLLED place in the log, where the log's scrolling
and clipping do not reach it. A labelled message that started more than a
viewport down had its label below the fold; the page grew to reach that one
pixel; and once the log was at its end, the wheel scrolled the page. In practice:
from the second turn of any conversation whose first one was long.
#log is now positioned (position: relative), which makes it the containing block
for everything inside it — this label, and anything taken out of flow later. The
label is as it was: out of flow, clipped, and in the accessibility tree.
Not done: locking the page with overflow: hidden. It would hide the symptom and
leave the cause. And in a window too short for the composer and the status row —
the shell needs 208px, measured in a 140px viewport — scrolling the page is the
only way to reach the bottom controls.
Verified in Chromium against the shipped chat.html, served the way the host
serves it (CSP and nonce filled in, acquireVsCodeApi stubbed) and driven with the
host's own messages: two agent turns, the first with a long code block, in a
1118px viewport.
before after
label's offsetParent <body> #log
last label, its message at -22px 1962px -23px
page height 1963px 1118px
composer after 4 wheel ticks -400px unmoved
transcript content height 2919px 2919px
Scrolling up inside the transcript still pauses auto-scroll and shows "jump to
latest". No console errors.
webviewCss.test.js gains the guard no DOM test can give, since the fake DOM lays
nothing out: #log is positioned and stays positioned, with the shell's premise
pinned beside it. It fails on develop's chat.html, on position: static, and on a
later rule that un-positions the log. 48 suites, 925 cases, 0 failing
(scripts/test-extensions.sh). docs/CHAT-TYPOGRAPHY.md D6 records the correction
and the measurements.
Not run in the editor: this worktree has no vscode/ build. Not reproduced: a
single run that works first and answers last. Tool activity folds into a compact
group, so that transcript stays short; the trigger confirmed here is a later turn
that starts below the fold.1 parent f7f6843 commit 6d17de5
3 files changed
Lines changed: 73 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
183 | 204 | | |
184 | 205 | | |
185 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
146 | 157 | | |
147 | 158 | | |
148 | 159 | | |
| |||
241 | 252 | | |
242 | 253 | | |
243 | 254 | | |
244 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
245 | 260 | | |
246 | 261 | | |
247 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
519 | 555 | | |
520 | 556 | | |
521 | 557 | | |
| |||
0 commit comments