Skip to content

Commit f4ffe43

Browse files
Merge pull request #534 from corbitsdev/cl-6898-move-live-agents-into-a-chrome-strip-above-the-prompt
Paint live agents above the prompt
2 parents 590bd36 + 6331c3f commit f4ffe43

10 files changed

Lines changed: 495 additions & 282 deletions

File tree

docs/TUI.md

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

175175
**Parked pending rebuild.** `formatChromeZones` (`src/tui/chrome-state.ts`)
176-
always returns `{ task: null, agents: null }` — neither the checklist strip nor
177-
the agents/fleet board auto-paints. Live work stays on transcript `● Task …`
178-
rows (see below). `formatTasksPanel` / `formatAgentsPanel` remain for a future
179-
rebuild; demos and shell tests may still feed preformatted rows via
180-
`setChromeZones` directly, and Alt+T (`toggleTasksPanel`) still toggles the
181-
shell's hidden flag for those manual paints.
182-
183-
A task is a unit of work with a status; an agent is an executor with its own
184-
context and transcript. They are never merged into one panel. When the
176+
keeps the task checklist parked (`task: null`) while the agents strip paints
177+
live. A task is a unit of work with a status; an agent is an executor with its
178+
own context and transcript. They are never merged into one panel. When the
185179
checklist strip is rebuilt, each row will show a bracket status marker (`[ ]`
186180
todo, `[~]` doing, `[x]` done, `[-]` cancelled) ahead of the title, bounded to
187181
`TASKS_PANEL_MAX_VISIBLE` with a trailing `+N more` under overflow, and
@@ -204,34 +198,40 @@ The panel stays **hidden by default** (CL-5847): a fresh shell does not paint
204198
the checklist. `toggleTasksPanel` (bound to Alt+T) opts in for the shell's
205199
lifetime — it flips a hidden flag held on the shell in memory only — so demos
206200
and tests that call `setChromeZones` with task rows can still show them.
207-
Because `formatChromeZones` parks auto-paint, Alt+T alone does not surface a
208-
live `manage_tasks` list today.
201+
Because `formatChromeZones` parks task auto-paint, Alt+T alone does not
202+
surface a live `manage_tasks` list today.
209203

210204
The task tool writes state through `ChatDirectorImpl` (`src/agent/director.ts`),
211205
which calls `onTasksChange` on every `manage_tasks` tool call and on session
212-
hydrate. `manage_tasks` calls paint no transcript rows; with chrome strips
206+
hydrate. `manage_tasks` calls paint no transcript rows; with the checklist
213207
parked, that list has no standing chrome surface until rebuild.
214208

215-
## Live sub-agent rows (Task tool)
209+
## Live agents chrome (strip above the prompt)
216210

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

220214
```
221-
Task Design Lab interview 1:07 · AskUserQuestion
222-
Task UI variations 0:59 · write_file
215+
explore map callers · 0:59 · grep
216+
general write tests · 1:07 · write_file
223217
```
224218

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

236236
### Unprompted fleet reports
237237

0 commit comments

Comments
 (0)