Skip to content

Commit 933f01e

Browse files
committed
Paint live agents in chrome above the prompt
1 parent bebe563 commit 933f01e

10 files changed

Lines changed: 504 additions & 279 deletions

File tree

‎docs/TUI.md‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,9 @@ removed line), not a decision marker, and no decision-marker shares that row.
163163
## The live task list panel
164164

165165
**Parked pending rebuild.** `formatChromeZones` (`src/tui/chrome-state.ts`)
166-
always returns `{ task: null, agents: null }` — neither the checklist strip nor
167-
the agents/fleet board auto-paints. Live work stays on transcript `● Task …`
168-
rows (see below). `formatTasksPanel` / `formatAgentsPanel` remain for a future
169-
rebuild; demos and shell tests may still feed preformatted rows via
170-
`setChromeZones` directly, and Alt+T (`toggleTasksPanel`) still toggles the
171-
shell's hidden flag for those manual paints.
172-
173-
A task is a unit of work with a status; an agent is an executor with its own
174-
context and transcript. They are never merged into one panel. When the
166+
keeps the task checklist parked (`task: null`) while the agents strip paints
167+
live. A task is a unit of work with a status; an agent is an executor with its
168+
own context and transcript. They are never merged into one panel. When the
175169
checklist strip is rebuilt, each row will show a bracket status marker (`[ ]`
176170
todo, `[~]` doing, `[x]` done, `[-]` cancelled) ahead of the title, bounded to
177171
`TASKS_PANEL_MAX_VISIBLE` with a trailing `+N more` under overflow, and
@@ -194,34 +188,40 @@ The panel stays **hidden by default** (CL-5847): a fresh shell does not paint
194188
the checklist. `toggleTasksPanel` (bound to Alt+T) opts in for the shell's
195189
lifetime — it flips a hidden flag held on the shell in memory only — so demos
196190
and tests that call `setChromeZones` with task rows can still show them.
197-
Because `formatChromeZones` parks auto-paint, Alt+T alone does not surface a
198-
live `manage_tasks` list today.
191+
Because `formatChromeZones` parks task auto-paint, Alt+T alone does not
192+
surface a live `manage_tasks` list today.
199193

200194
The task tool writes state through `ChatDirectorImpl` (`src/agent/director.ts`),
201195
which calls `onTasksChange` on every `manage_tasks` tool call and on session
202-
hydrate. `manage_tasks` calls paint no transcript rows; with chrome strips
196+
hydrate. `manage_tasks` calls paint no transcript rows; with the checklist
203197
parked, that list has no standing chrome surface until rebuild.
204198

205-
## Live sub-agent rows (Task tool)
199+
## Live agents chrome (strip above the prompt)
206200

207-
Live workers paint as pending `task` tool rows in the transcript — the
208-
operator-preferred Amp/Codex-style lines:
201+
Live workers paint as a **flat agents strip** above the prompt (label /
202+
status / current tool) — Amp/Codex-style lanes without a FLEET header board:
209203

210204
```
211-
● Task Design Lab interview 1:07 · AskUserQuestion
212-
● Task UI variations 0:59 · write_file
205+
● explore map callers · 0:59 · grep
206+
● general write tests · 1:07 · write_file
213207
```
214208

215-
`runtime-bridge` paints each `task` call as a stream row and rewrites it in
216-
place via `syncAgentProgress` / `agentProgress` (elapsed clock, current tool,
217-
stall marker). Ordinary in-flight tool rows get the same elapsed clock
218-
(`syncToolElapsed`) without the current-tool suffix, so a slow MCP or
219-
network call is distinguishable from a hung turn. There is no standing
220-
FLEET board and no dual-rail agents chrome:
221-
`formatChromeZones` always returns both zones null (`task` and `agents`), and
222-
geometry is stack-only (`layoutMode: "stack"`, `railWidth: 0`). Checklist and
223-
agents strips are parked pending rebuild; Alt+T / direct `setChromeZones` may
224-
still paint for demos and tests.
209+
`formatChromeZones` → `formatAgentsPanel` owns that paint. Geometry stays
210+
stack-only (`layoutMode: "stack"`, `railWidth: 0`); the zone max is
211+
`AGENTS_PANEL_MAX_VISIBLE + 1` (lanes plus a trailing `+N more`). Terminal
212+
lanes (done / failed / cancelled) linger for `AGENTS_PANEL_LINGER_MS` (4s)
213+
after `finishedAt`, then drop. Product-host sticky poll uses
214+
`agentsChromeNeedsSticky` so clocks and linger stay fresh; while sticky is
215+
needed it **does not** call `bridge.syncAgentProgress` — chrome owns the live
216+
clocks.
217+
218+
### Transcript Task rows (history anchors)
219+
220+
`runtime-bridge` still paints each `task` call as a transcript stream row for
221+
**spawn / final / fail anchors**. While the agents strip is sticky, sticky-poll
222+
`syncAgentProgress` rewrites are gated off so the transcript is not a dual live
223+
rail. Ordinary in-flight tool rows keep their own elapsed clock
224+
(`syncToolElapsed`) without the current-tool suffix.
225225

226226
### Unprompted fleet reports
227227

0 commit comments

Comments
 (0)