Agent pane flickers when a thought opens like an earlier one: the old Thought takes its reveal #569
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
On run 204's
agent.code-review, with show thinking on, the agent pane switches layouts every 40–120 ms: the live Thinking row loses its text and gets it back, and the scroll jumps each time. #552's fix is live; this is a second cause.Why
A settled row takes over a live row's reveal by matching text, not part (
adoptReveal). The agent was looping, and every thought opened "I keep running commands. Let me stop…", so each earlier Thought the list mounted took the new thought's reveal and then deleted it. The live row restarted from nothing, heights swung, the follow jumped, and more old rows mounted.Fix
Hand a reveal only to the settled row of its own part. A settled row never takes or deletes a live row's reveal.
Done when
A test streams a thought that opens like an earlier settled Thought, and on every frame the earlier Thought keeps its height and the live row keeps its text.
Where to look:
ui/src/lib/reveal.ts(adoptReveal),Reasoning.tsx, settled prose inTranscript.tsx.Seen by the owner on run 204 (a screen recording); diagnosed 2026-11-20.
Shipped in #571 (change
reveal-handover-by-part, archived in #572). Live as59c8aadsince 20:26 UTC on 2026-11-20.A settled row now carries on only the reveal of its own parts. Lines carry their part ids, and one function names a reveal for both the live row and the hand-over. So an earlier Thought that reads like the thought being written no longer takes its reveal, and the agent pane no longer swings between layouts while a looping agent thinks.
Evidence
The new journey
ui/e2e/live-thought.spec.tsstreams a thought that opens like an earlier one, through the test server's new/_test/deltaroute. On main it failed three ways:With the fix it passes, 6 times in 6 repeated runs.
A vitest test of the hand-over failed first on the text matching, then passed.
A probe in a 2200 px window with scrollbars drawn streamed the looping thought and wheeled the pane up and down for ten seconds. The earlier thought changed height 6 times in each run on main's UI, and 0 times with the fix.
An open console picks up the fix once the page is reloaded.