fix(agent-pane): show workflow progress in tray and inspector (carry of #27886)

Merged
TE
5d ago
+701-43

Carries #27886 (its owner's lane VM no longer resolves). It keeps that PR's commits and authorship, merges the current base, and fixes the conflicts against base's newer tray design.

Takes back #28164: replaces its whole-list progress dependency in App.tsx with keyed AgentProgressStore subscriptions, so a usage-only update notifies only the changed agent instead of rebuilding every row.

Leo, 2026-10-29: "i also want all those ui fixes/improvements in and stuff too along with more think tanks to improve stuff too after learning all those ui dev things".

What it does

  • Running workflows show their completed/started agent counts, failed and queued agents in the default running tray and in Session Info. Before, only the alternate transcript card showed them.
  • Progress updates arrive through keyed per-agent subscriptions (subagents/agentProgressSource.ts, agentProgressStore.tsx). A usage-only snapshot touches one row and rebuilds no list. Compatibility snapshots, versioned snapshots and session switches keep their progress.
  • SW-04: when the owning root is identified late, its progress identity and pending delta are dropped, and real workers and grandchildren stay.
  • The Inspector's row and its hover card read the same live progress.

Changes in this carry (base merge)

  • #29608 took tokens and tool uses off the tray's subagent rows (Leo, 2026-10-31: "we can remove the symbols and the tokens"). The live store follows it: useAgentProgress takes the same usage option, the tray's AgentLine passes progressUsage={false}, and the Inspector keeps its tokens.
  • #29264 set the tray's trailing tracks (time, state, Stop's track, chevron), and this carry keeps them. #27886's own reordering of those columns is dropped, along with its screenshots, which predate both.
  • The Inspector's AgentLine gets progressAgent too. Before this, only its hover card subscribed to live progress, so inspector-subagent-card-stays failed: the line kept "0/3 agents · 1K tokens".
  • The tests follow the tray's counts, with no tokens.

Observed / Not run

  • Local: bun test test/subagent-tray.test.tsx test/agent-pane-workflow-progress.test.tsx test/inspector-subagent-card-stays.test.tsx test/subagent-tray-trailing.test.ts passes (47 pass, 0 fail). bun run check is clean.
  • Not run locally: the Chromium tray geometry suite, which goes to CI at this head.
  • No screenshots: Leo tries the build.

Changelog

  • Fixed: running workflows show their agent counts in the running tray and in Session Info.

Design: running tray.

🤖 Generated with Claude Code

Agent session: agent session


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


Summary by cubic

Shows running workflow progress (completed/started counts, failed, queued) in the default running tray, the Inspector's row, and their hover cards. Replaces the whole-list progress dependency in App.tsx with keyed per-agent AgentProgressStore subscriptions, so usage-only updates re-render just the changed agent row instead of rebuilding every row.

  • Direct snapshots carry keyed progress deltas from the event fold; bridge/gallery snapshots keep the same keyed contract, with a compatibility path for unversioned snapshots, and reset their store per session.
  • A late root identification drops phantom progress while real workers and grandchildren stay.
  • Since the base merge, no subagent list shows tokens or tool uses (only the Inspector's Context does); the tray and Inspector rows read the same live store.

Observed / Not run

  • Local: bun test test/subagent-tray.test.tsx test/agent-pane-workflow-progress.test.tsx test/session-info-subagent-card-stays.test.tsx test/subagent-tray-trailing.test.ts passes (47 pass, 0 fail). bun run check is clean.
  • The App tests turn workflows off as the workflowLabs push would (base turns them on by default, #30192) and open the tray for their chats (#29250), since a running workflow leaves the tray.
  • Not run locally: the Chromium tray geometry suite, which goes to CI at this head.
  • No screenshots: Leo tries the build.