Agent chat: the WebKit scroll-up test reads the offset after the wheel glide settles (base red)
Fixes the base red in webviews/test/agent-pane-stream-jitter.test.ts: "webkit: scrolling up while a reply streams is never pulled back".
Root cause (test timing, not the pane): Linux WebKit (WPE, which CI runs) animates a wheel step over several frames. The case read scrollTop 150ms after wheel(0, -400). On a loaded runner that read landed mid-glide, so the rest of the glide looked like a pull-back. A per-frame trace from CI on this PR's first head showed it:
- the wheel at 605, then scrollTop 582 ā 476 ā 365 ā 220 ā 205 over ~330ms
- the test read
leftas 220, 290, 322 or 500 depending on the run - then scrollTop held at 205 while the reply grew the content from 1201px to 1507px, with no pull-back toward the bottom
Every run ended at 205, the glide's end, so the pane never moved the reader. macOS WebKit and Chromium don't animate the wheel step here, which is why the case passes locally.
Fix: read the scrolled-up offset once scrollTop has held for 200ms (settledScrollTop), instead of after a fixed 150ms. The rest of the case is unchanged: 600ms after the turn ends the view must still be at that offset and more than 200px from the end, so a pane that re-pins or yanks the reader still fails.
There is no app change, so on base this case fails only where the wheel glides (CI's Linux WebKit). It passed 3/3 locally in Chromium and macOS WebKit.
Agent session: cmux16
š¤ Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.