Agent chat: Jump to latest glides to the end after the composer grew
Summary
Review notes on #23097. While you are scrolled up, the room under the last row stays as it was. If the composer grows in the meantime, the scroller ends short of the taller card. Jump to latest then snapped to the end instead of gliding: following again gave the room back, and a followed view's room moves its offset at once. Jump to latest now takes the room back first, out of view, and glides to the end above the card.
The other review note, that scrolling back to the end must never show the last row under the card, already holds on base in Chromium. Its new test passed on the test-only head, so it is kept as a guard with no code change for it.
Changelog
Fixed: In agent chat, Jump to latest glides to the end after the composer grew while you were scrolled up, instead of snapping.
Testing
Command: cd webviews && CMUX_BROWSER_TESTS=1 bun test test/agent-pane-scrollbar-full-height.test.ts (real Chromium, run in CI).
- Test-only head 5566a2a, shard 1:
- "Jump to latest after the composer grew glides to the end above the card" fails: 1 moving frame, where it needs at least 3, so it snapped.
- "scrolled back to the end after the composer grew, the last row is never under the card" passes.
- Fix head c4129e5, shard 2:
agent-pane-scrollbar-full-height.test.tspasses, both new tests included.
Observed / Not run
- On c4129e5, shard 1 also failed
webkit: a queued prompt sent as the next turn moves the view up onlyin agent-pane-stream-jitter (two 1 px drops at 3.4 s; Chromium passed). That test never presses Jump to latest, and every line this PR adds runs only during a jump, so it is not this change. Base has since reworked that test's frame reads (#23374), and the head merges it. cmux-next checksfailed on its Companion workflows step (autofix follower tests). This PR touches no workflow or script.- The local web lint fails on
check:text-focus, a base red in CSS this PR does not touch, so the push used the documented skip reason. - Not run: WebKit for the new tests (this test file runs only in Chromium), and the real app.
Agent session: cosmic-gray
🤖 Generated with Claude Code