Transcript: a background update with nothing to open has no chevron, and draws no line once it ends

Merged
TE
3d ago
+174-24

Leo (2026-11-03): "these background updates don't really expand out to anything? idk what those are even for"

What these rows are

acpmux brackets each turn the agent runs without a prompt (a background task finished, a scheduled wakeup, anything else such as a hook or late work after a restart) with background_turn records. A quiet one draws as one muted line ("Background task finished", "Scheduled check", "Background update") that opens to the rows the turn made (#30205).

Some of these turns make no rows of their own. Their events only update rows that belong to something else, such as a call an earlier turn started or a subagent's tool calls while the main agent is idle. Those draw a "Background update" line whose chevron opens to nothing. In the session logs I checked, every empty line was a system trigger, which reads as "Background update".

Change

  • direct.ts (OrderedRows) records on the line (background.hasRows) when a row of the turn's own draws something. That covers a row tagged live, a row tagged when an older page brings the started record, and the line keeps the mark when its ended record arrives.
  • backgroundTurns.ts drawsBackgroundLine: a quiet turn that ended with no rows of its own draws no line. It has nothing to show and nothing to say. Its rows (if any, all visibly empty) stay folded as before.
  • BackgroundTurnLine.tsx: a running turn with no rows yet is a plain spinner line, with no chevron, no button and no aria-expanded. Once its first row comes, it opens to that row.
  • TranscriptActivityRow.tsx: a chevron prop (default true, so other rows are unchanged). Chevron placement is untouched.
  • Gallery: transcript / background-turns-nothing-to-open, with a play that asserts the ended line is absent and the running line is neither a button nor has a chevron. Existing gallery lines carry hasRows: true.

No new strings. Turns that do have rows keep their trigger labels and open as before.

Observed / Not run

  • Observed: red/green. test/agent-pane-background-turns.test.ts was committed first (2aedebf). On base code it fails 2 tests: the ended empty line is drawn, and the running empty line is a <button> with cv-agent-activity__chevron. On head: 20/20 pass across it and backgroundTurns.test.tsx.
  • Observed: replaying real acpmux session logs through the reducer. One session with 4 quiet system lines that had no rows now draws 0 of them. A session with 24 quiet lines, all with rows, still draws all 24.
  • Observed: web-lint.sh and prepush-gate.py pass. On a fleet box, the background, activity-row, step-row and spacing tests pass 37/0 (run 41561316728). bun run check there is red only on two no-implied-eval warnings in test/native-session-info-toggle.test.tsx, a file this PR does not touch. That is a base red, already fixed on base by #32760.
  • Not run: the new gallery play in a browser, and a DEV build.

Changelog

  • Agent chat: a "Background update" line with nothing to open no longer shows. One still running has no chevron until it has something to show.

Agent session: agent session

šŸ¤– Generated with Claude Code