cmux NEXT session rail: a Background tasks card
Summary
Claude desktop's session panel has a Background tasks card: running commands with how long each has run, a stop button, and how many finished. The cmux NEXT session rail (Debug Settings agent.sessionRail) had no such card.
Now the rail grows a Background tasks card once the chat has a background process. It reads acpmux's process registry (cmux-tui/crates/acpmux/docs/background-processes.md): _acpmux/process/list {sessionId} when the rail shows, then each _acpmux/process_update. The registry holds Claude Code's background shells and Codex's background terminals, so the card is the same for both harnesses.
- Running commands, newest first, each with its elapsed time (ticking each second while one runs) and Stop (
_acpmux/process/kill). A refused Stop says so and can be tried again; otherwise the row stays until the registry reports the end. - The header counts the running ones (
2 running); the card ends with3 finished. - Five rows show; the rest sit behind Show more.
- A reconnect makes a new client, so the source changes with it and the card lists again.
Stacked on #22327 (the Changes card). Until that merges this PR's diff includes its commits; the commits for this card start at 9da29f3378c.
The gallery entry now covers RailChanges.tsx and RailTasks.tsx (the gallery coverage test listed both as missing).
Testing
bun test test/session-rail-tasks.test.tsx test/session-rail.test.tsxon Huge Blue: the new test file fails on the test commit 9da29f3378c (module missing) and all 14 pass on the head. It covers the wire parsing, merging updates, the card (order, elapsed time, Stop, finished count), an update that arrives before the list, a refused list, a chat switch, a new client, and a refused Stop.bunx vp checkon Huge Blue: clean.check:type-scale,check:status-glyphs,check:system-bluepass.check:dialog-keysfails on base (Swift files, not this PR).- Localization: two new keys (
rail.running,rail.finished) with all 21 agent-pane locales; reusedsummary.backgroundTasks,subagents.stop/stopFailed,prDock.more/less.
Changelog
Added: The cmux NEXT session rail shows a Background tasks card with each running background command, how long it has run and a Stop button.
Proof
New tasks variant of the agent-pane.session-rail gallery entry (two running, three finished), rendered from head e383a013591 in Playwright WebKit on a fleet Mac (macOS system font). It's a gallery story, not the running app.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Updates the cmux NEXT session rail with two cards matching Claude desktop's panel: Background tasks (running commands with elapsed time and Stop, plus a finished count) and Changes (pull requests the chat opened, newest first, with checks, line counts, and Merge/Close state).
The Background tasks card reads acpmux's process registry (_acpmux/process/list when the rail shows, then each _acpmux/process_update), so it works the same for Claude Code and Codex background processes. The Changes card combines the chat's pull requests with what the App reads of the chat folder's current one, so checks and a close-then-reopen show correctly; a close the chat ran wins until a later App read. Both cards show five rows with the rest behind Show more.
- Running commands sort newest first with a Stop (
_acpmux/process/kill); a refused Stop says so and can be retried. The header counts running commands (2 running) and the card ends with3 finished. - A reconnect creates a new client, so the process source changes with it and the card subscribes and lists again.
- Process updates merge without
Array.withfor the base's type check. - Stacked on #22327 (the Changes card); commits for this card start at 9da29f3378c.