Agent pane: the live line stays shown while a reply streams

Merged
TE
2d ago
+33-28

Leo: "it appears and disappears????" (with a capture of a running agent chat where the spot under his message showed nothing)

Leo-ask: ask-245840dfaf

What was wrong

The running turn's live line (the Codex-style line at the bottom of the turn) hid itself with visibility: hidden whenever the reply above it streamed, and came back only once the text had held still for 1.2s (useQuiet with QUIET_MS, .cv-worked.is-quiet). Replies stream in bursts, so the line blinked in and out at every pause in the stream.

Fix

The live line never hides mid-turn. While the reply's text moves it stays where it is and reads "Writing", then "Thinking" after WRITING_MS (5s) of quiet, the labels liveState: "writing" already gave it. Its height and place are unchanged, so nothing moves.

  • Thinking.tsx: drops the quiet hide on the live line (and the now unused QUIET_MS); the useQuiet timer still drives Writing → Thinking.
  • loadDebug.ts / agent-pane-stream-renders.test.ts: the stream harness now counts frames with the live line hidden while a reply streams and expects 0 (it used to count shown frames and expect 0).
  • Thinking.test.tsx, transcript-codex-live-line.test.tsx: assert the line stays shown and reads Writing.

Design spec: design/chat-transcript.md (the live line keeps the Thinking line's id from send to the turn's end, so it never leaves and comes back). This undoes the hide-while-streaming behaviour from the live-line work (#34004's review kept it hidden while streaming); Leo's capture asks for the opposite.

Risk: small, one component; no timers added (one fewer useQuiet timer per live line).

šŸ¤– Generated with Claude Code

Agent session: agent session


Autofix with [code]smith
Open in [code]smith Ā· Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

The running turn's live line no longer hides while its reply streams, so it stops flickering in and out at every pause in the text (Leo, 2026-11-04: "it appears and disappears????"). The line used to hide itself with visibility: hidden as soon as the reply text above it moved and returned only after 1.2s of quiet; streamed text moves in bursts, so the line blinked constantly. It now stays where it is and reads "Writing" while the text moves, then "Thinking" after 5s of quiet, the labels liveState already gave it.

Bug Fixes

  • Thinking.tsx drops the quiet hide on the live line and the now-unused QUIET_MS; no timers added, one fewer useQuiet timer per live line.
  • The debug harness now counts frames where the live line is hidden during a reply stream and expects zero, instead of counting shown frames.
  • Tests assert the live line stays shown and reads "Writing" under a streaming reply.