Repository navigation
Agent chat: a streamed turn never flickers Session Info or the header (guard test) - #33526
Conversation
…ader The real pane, with Session Info open, takes a long streamed turn (reply tokens, tool calls that start and finish, usage ticks) and reads every box of Session Info and of the chat header on every painted frame, in Chromium and WebKit: none is replaced, moves, changes opacity or visibility, or paints empty, and no CSS animation or transition starts in either. A control at the end shows the sampler catches a remount, a blink and an animation start. No flicker reproduces at base or at the commit before #33203; the test lands as a guard (cmux#33201). Fleet runs: green in both engines at base (385/311 frames) and at a86fae3 (373/287 frames). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-81baa1463f6190d4c5dc
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Unclear: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by Shipped in:
|
|
Found 6 test failures on Blacksmith runners: Failures
|
|
Review (subagent claude-opus-5-5 medium): SHIP at 3506a43 Visual verdict: unchanged by this diff Checked the test against agent-pane-turn-end-keeps-place.test.ts and support/paintedFrames.ts. Every read goes through cmuxAfterPaint or cmuxPaintFrame, and there is no requestAnimationFrame read, so check-frame-reads has nothing to flag. The stand-in daemon matches the sibling's protocol (initialize, watch, attach, events, _acpmux/event, session_changed), and requireBrowserLane plus the l10n-allow-file and cmux-web-test-timeout headers are in place. It cannot pass vacuously: it asserts the panel, header and a [data-section] key exist, asserts more than 100 frames, and a control shows the sampler catches a remount, a removal, a blink and an animation. The control's one-frame blink is safe, since the sampler's frame callback is registered before cmuxPaintFrame's and its read task is queued first. Follow-ups: (1) only keys present on the first sampled frame are checked, so a section or header tool that mounts mid-stream is never itself checked (its effect on its neighbours' boxes still is); (2) moves and blinks stop at the first hit per key, so a report can hide a later, different flicker of the same box. Neither blocks. |
…; from #33526) (#33545) * base red: the no-flicker test drops its unused outer Box type (each page.evaluate body declares its own; from #33526) * base red: the no-flicker test's page listener types its parameter as globalThis.Event (the file's own Event type shadowed it; from #33526) Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d60a77e16a11b66e2ecf
* perf: batch transcript row measurements after content layout Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-fc0fa4c5ed2467ab49a6 * base red: the no-flicker test type-checks (unused Box, shadowed Event; from #33526) (#33545) * base red: the no-flicker test drops its unused outer Box type (each page.evaluate body declares its own; from #33526) * base red: the no-flicker test's page listener types its parameter as globalThis.Event (the file's own Event type shadowed it; from #33526) Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-d60a77e16a11b66e2ecf --------- Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Co-authored-by: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com>
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo, 2026-11-03: "likewise i don't want to see flickers of the session info or anything when there's random re-renders EVER"
Closes #33201. Builds on #33203, which stopped Session Info from re-rendering on every streamed update. This PR adds the painted-frame guard the issue asked for: it covers the chat header too, runs in WebKit as well as Chromium, and drives the real pane instead of a harness.
What flickered
Nothing, at base or at the commit just before #33203 (a86fae3). Every Session Info box (the panel, the Environment and Context sections and their bodies) and every chat header box (the header, its status slot, its tools) kept the same element, the same box, the same opacity and visibility, and its text, on every painted frame of the stream. No
animationstart,transitionstartortransitionrunfired inside either one, and no element was removed from either one. The re-renders #33203 removed never reached the screen as a visible flicker. So this PR changes no product code and lands the test as a guard.Test
webviews/test/agent-pane-streaming-no-flicker.test.ts(browser lane, Chromium and WebKit). The test serves the pane's dev entry and connects it to a stand-in acpmux. It turns Session Info on, then streams a long turn: 12 steps, each sending reply tokens one word at a time, a tool call that starts and finishes, and a usage tick withsession_changed. After every painted frame (support/paintedFrames.ts) it reads each box of Session Info and of the header. It fails on any of these:A control at the end of the test replaces a section with a copy, dims the header for one frame and starts a CSS animation on a header tool. It asserts that the sampler reports all three, so a green run means nothing flickered, not that the sampler saw nothing.
Command:
cmux-ci test --setup playwright -- bash -c 'export "$(bash scripts/ci/ensure-system-chrome.sh --optional | tail -1)"; cd webviews && CMUX_BROWSER_TESTS=1 bun test test/agent-pane-streaming-no-flicker.test.ts'There is no red-on-base run because no flicker reproduces; the control is what shows the test can fail.
Observed / Not run
scripts/web-lint.sh(withCMUX_LOCAL_HEAVY_CHECKS=0) andprepush-gate.pyare clean.Changelog
none
Agent session: agent session
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Adds a guard test that a streamed agent turn never flickers Session Info or the chat header, in Chromium and WebKit.
Written for commit 3506a43. Summary will update on new commits.