Repository navigation
Session Info: a streamed update paints nothing in it - #33203
Conversation
…s sections draw again on every token) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-7a7568197607c3cdfb81
|
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)
Shipped in:
|
…hing in it Every snapshot is new objects, so the lists SessionInfoPresence derives from it (what the chat made, its links, agents, usage, sessions) were new on every token and the sections, not memoized, all drew again. They now keep their identity while they hold the same things (sameValue.ts) and draw through a memoized SessionInfoSections. The chat column the placement effect depends on is kept by value too, so a zoomed page or an own chat width no longer rewrites the shell's column pin and dispatches a chat-layout event on every render. bun test test/session-info-no-flicker.test.tsx: red at 95aa733 (50 of 50 updates drew OutputsSection), green here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-7a7568197607c3cdfb81
…chat's task row Review of d922a51: the sections kept their rows until a row was added, so the tool calls a remote chat's background task row looks up went stale when a call landed in the turn's existing activity row. SessionInfoPresence now reads the call ids itself (kept while the same set) and hands them to the sections; the kept gallery rows also follow the listed agent. bun test test/session-info-no-flicker.test.tsx: the new remote-call test is red at d922a51 and green here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-7a7568197607c3cdfb81
…st settles Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-7a7568197607c3cdfb81
|
Found 7 test failures on Blacksmith runners: Failures
|
teamleaderleo
left a comment
There was a problem hiding this comment.
Review (claude-opus-5-5): SHIP at f8af7fb
Review (subagent claude-opus-5-5): SHIP at f8af7fb
Visual verdict: unchanged by this diff (no UI drawn differently; Session Info only stops redrawing for updates that change nothing it shows).
Checked the fix for the earlier BLOCK at d922a51 (a remote chat's background task row lost Show call when a call landed in the existing activity row): SessionInfoPresence now reads the call ids itself through useSameValue and hands them to the sections; the remote-call test is red at d922a51 and green here. Also checked the structural-equality helper, the memoized sections and the column kept by value. session-info-dead-clicks fails the same way on base.
Follow-ups:
- [follow-up] read the remote tool-call ids only when a background command has a toolCallId.
- [follow-up] refresh the kept gallery rows when an image changes in place (same row count and gallery count).
- [follow-up] make the remaining callback props to the sections stable, or test that they are.
…ader (#33526) 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). Agent-Session: https://cmux.com/deeplink/agent?id=aid-81baa1463f6190d4c5dc Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo, 2026-11-03: "im still getting these weird layout shift things when im already scrolled up due to idk tool calls shifting/messages coming in maybe that should not happen / likewise i don't want to see flickers of the session info or anything when there's random re-renders EVER"
This PR is the Session Info half: an update that changes nothing Session Info shows (a streamed token, a tool call that makes nothing, a usage tick) draws nothing in it. Keeping the transcript in place while scrolled up is another lane's work.
Root causes
SessionInfo.tsxSessionInfoPresence: every acpmux snapshot is made of new objects, so the lists it derives (summary,made,links,documents,agents,transcriptTasks,processes,waiting,snapshot.sessions,peerKinds, grants, the started chats and workflows) were new on every token, and the<SessionInfo>sections, which were not memoized, all rendered again on every update. They now keep their identity while they hold the same data (newsession-info/sameValue.ts,useSameValue), the sections render through a memoizedSessionInfoSections, and the App's callbacks go throughuseStableCallback.chatColumnOf(...), which returns a new object when the display sets its own width or the page is zoomed. The placement layout effect depends on it, so on every render it rewrote the shell's--acpmux-session-info-columnand--acpmux-header-roomand dispatchedCHAT_LAYOUT_EVENT. The column is now kept by value.Tests
webviews/test/session-info-no-flicker.test.tsx(jsdom): mounts the pane with Session Info open, then applies 50 updates: a token at a time, a tool call every fifth, and a usage tick with new objects holding the same values. It asserts no DOM mutation inside the panel (MutationObserver,takeRecordsincluded), the same section elements, an unchanged frame style, and zero renders ofOutputsSection/EnvironmentSectionafter mount (both spies count at mount as a positive control). Red at 95aa733 (all 50 updates renderedOutputsSection), green here. A second test (a remote chat's task row gets its Show call when the call lands in the existing activity row) is red at d922a51 and green here.webviews/test/session-info-no-flicker-browser.test.ts+test/browser/session-info-no-flicker.harness.tsx(Chromium): 50 updates at 1400/1000/600 px (float, push, overlay). It asserts no mutation in the panel, no layout-shift entry with a source inside it, and one bounding rect throughout.Performance
test/session-info-no-flicker.test.tsxbun bench/ui-stability.bench.ts 3 --only session_info, base run https://github.com/manaflow-ai/cmux/actions/runs/41593125846ui.session_info.clswas already 0.0000 at this PR's base (the 0.028 reading predates it). That bench measures the open play, not streaming, so this change is not expected to move it.No new timer, observer or animation loop.
Observed / Not run
bun teston everytest/session-info*.test.tsx,background-task-arrival,native-session-info-toggleandchat-header-every-tool-acts, all green exceptsession-info-dead-clicks("every line of the tray…"), which fails the same way at base.scripts/web-lint.shis clean exceptcheck:design-tokensoncloudStart.css, a base red.Agent session: agent session
🤖 Generated with Claude Code