cmux NEXT Inspector: Subagents names each running one; ended ones fold into one row

Merged
TE
13d ago
+499-281

Summary

Leo, on the Inspector's Subagents card ("17 running · 1 failed · 94 done" over a row of identical chat icons and "+104"): "CLICKING ON THESE DOESN'T DO ANYTHING. WHAT'S THE DESIGN DECISION HERE?" The row only toggled a list below it, and every icon looked the same.

Now Subagents lists them the way Claude Code desktop's session panel does:

  • Running ones are named rows. Each running subagent and each running chat the agent started is its own line (AgentLine, the same line as the tray above the composer): its name, what it does now, how long it has run, and Running or Waiting. Waiting ones come first. After five, "Show N more" opens the rest and "Show less" folds them back.
  • A click opens it. A subagent opens its pane or view (showSubagent). A chat opens beside this one (chat.offer.open; #23764 makes acpmux new chats open). Rows that can't open are disabled, not dead.
  • Hover card. Each row's hover card shows its name, its state, time and current action, and its task.
  • Ended ones are one row. Finished, failed and stopped ones fold into a single row, "94 done · 1 failed ›". A click opens their lines, failed first, and each line opens what it names.
  • The section head keeps its live counts. The avatar row, its "+N" and its CSS are gone.
  • Each running row's icon has acpmux-wave-item and --wave-index (its place in the list) for the shared running wave another lane is adding. No per-icon pulse.

Also: the Inspector no longer passes a no-op onOpenSubagent fallback. Without a handler, subagent rows are disabled instead of clicking into nothing.

Testing

  • webviews/test/chat-inspector.test.tsx: rewrote the Subagents tests for the new rows. They cover names and states in order (waiting first), clicks opening the subagent or chat, --wave-index, the ended row's text, opening it and the failed-first order, and Show more / Show less past five. They passed on huge-blue (see Observed).
  • scripts/web-lint.sh (Oxfmt, Oxlint, type check, catalog keys) passed.

Observed / Not run

  • Observed: web-lint passed. On huge-blue at this head, bun test ./test/chat-inspector.test.tsx passed 17/17, and the reveal, motion, tasks and subagent/tray test files passed 58/58. The gallery before/after is below.
  • Not run: the whole webview suite (CI runs it).

Changelog

Changed: The Inspector's Subagents names each running subagent and chat on its own line with what it does now, and a click opens it; finished ones fold into one "N done · N failed" row that opens their list

Proof

Linux gallery (agent-pane.chat-inspector, built at the base commit 883ff472ab1 and at this head, Subagents section only):

BeforeAfter

A busy chat (subagents-busy): five running rows, the one waiting on the person first, then "Show 12 more" and "94 done · 1 failed":

Hover card on a row, and the ended row opened (the failed one first):

No capture: webview-only; Linux gallery before/after above.

Localization: two new keys, chatInspector.subagents.more ("Show {n} more") and chatInspector.subagents.less ("Show less"), translated in all 21 catalog languages. The avatar row's chatInspector.subagents.show/.hide are removed. The ended row reuses the translated summary.subagents.done/failed/stopped.

Agent session: cosmic-gray