Canvas: click a step of a watched run to see what it did (agent summary, tool calls, logs, changes) #427

Closed
opened 2026-10-27 13:36:17 +00:00 by sam · 0 comments
Owner

Purpose

An operator watching a run on the canvas can see that a step failed or is slow, but not why. Clicking a step that has run must show what actually happened inside it, so the canvas is where a run is diagnosed, not just observed.

Today

  • Clicking a step always opens the step editor (definition), even when a run is being watched.
  • What a step did is recorded but not shown here: agent child steps (RunAgentChild records each agent run under the stage step, with tokens and summary), tool_call events (data: tool, failed), agent_finish events (summary, usage), changes_captured, and the per-stage log (GET /api/tasks/{id}/logs?attempt=&stage=, stage is a narrowing filter; see internal/webui/api_tasks_logs.go).
  • The task page (ui/src/tasks/) already renders much of this per task; reuse its components and readers rather than writing new ones.

Build

  1. When a run is watched and the clicked step has a recorded run, the slide-in opens a Run tab for that step (the definition editor stays one click away as a second tab).
  2. The Run tab shows, in order: status, duration, error in full; the agent's finish summary; the tool calls it made (tool, outcome, in order, collapsed past a dozen); tokens used; changes captured (files and lines); and the step's log lines, streaming while the step is running.
  3. A parallel step shows its branches' agent runs grouped by branch.
  4. Data comes from existing endpoints. If something needed is not served (for example tool calls per stage), add the smallest read to archie-ui's existing task API, not a new service.

Context every agent needs

  • The Workflows page (ui/src/workflows/WorkflowsPage.vue, WorkflowEditor.vue) is archie-core's main operator surface: a Vue Flow canvas (WorkflowCanvas.vue, nodes in StepNode.vue, layout in workflow-graph.ts) that both edits a workflow definition and watches its runs. Edits are edits to the YAML document (workflow-edit.ts), so the canvas and the YAML tab never disagree. Read WORKFLOWS.md (repo root) for the workflow language.
  • The watched run comes from useWorkflowRuns (workflow-runs.ts): GET /api/tasks filtered by workflow, and GET /api/tasks/{id}/attempts for its recorded steps (stage rows: name, status ok|failed|interrupted|running, duration_ms, error). A step is recorded under its id, else its type. Live refresh is useLiveResource("tasks", ...) over the SSE stream.
  • Slide-in panels over the right edge of the canvas (StepEditor.vue, WorkflowSettings.vue) are the pattern for details and editing. Do not add a permanent side panel.
  • UI bar the maintainer has set (memory: canvas UI taste): direct manipulation (right-click menus, inline + points, panels that open on demand), no instructional filler text, the field that matters first, help text on hover, nothing that makes the page scroll when the canvas could pan. Drive every change in a headless browser (Playwright with the system Chrome works; stub /api/** with page.route) and look at screenshots at 1920x947 before calling it done.
  • AGENTS.md rules apply: cheapest change first, services own contracts (the dashboard reaches other services only through archie-ui's HTTP API and their gRPC contracts), no new binaries, regenerate and commit ui/dist with the change, task check gates the commit, tests only for the seams AGENTS.md lists.

Acceptance criteria

  • With a run watched, clicking a step that ran opens its Run details; clicking one that did not run opens the editor.
  • The details show status, duration, full error, agent summary, tool calls, tokens, captured changes and log lines for exactly that step (verified against a real or recorded run of implement or tdd).
  • A running step's log and tool calls update live without reloading.
  • No new binary, no new gRPC service; any new read is on archie-ui's task API. task check passes; screenshots reviewed at 1920x947.

Close reason

Implemented canvas Run/Definition step inspector with persisted agent summaries and tokens, step-attributed tool calls, branch grouping, captures and live stage logs. Full task check passed on committed tree; Chrome at 1920x947 verified fixture-based run details, live updates, scope, failed steps, branches, and delayed run switching. No live deployment exercised.


Imported from beads archie-core-t19m.5 · GitHub #1405 · type feature · priority P1 · created 2026-10-05 · closed 2026-10-05

## Purpose An operator watching a run on the canvas can see that a step failed or is slow, but not why. Clicking a step that has run must show what actually happened inside it, so the canvas is where a run is diagnosed, not just observed. ## Today - Clicking a step always opens the step editor (definition), even when a run is being watched. - What a step did is recorded but not shown here: agent child steps (`RunAgentChild` records each agent run under the stage step, with tokens and summary), `tool_call` events (data: tool, failed), `agent_finish` events (summary, usage), `changes_captured`, and the per-stage log (`GET /api/tasks/{id}/logs?attempt=&stage=`, stage is a narrowing filter; see `internal/webui/api_tasks_logs.go`). - The task page (`ui/src/tasks/`) already renders much of this per task; reuse its components and readers rather than writing new ones. ## Build 1. When a run is watched and the clicked step has a recorded run, the slide-in opens a Run tab for that step (the definition editor stays one click away as a second tab). 2. The Run tab shows, in order: status, duration, error in full; the agent's finish summary; the tool calls it made (tool, outcome, in order, collapsed past a dozen); tokens used; changes captured (files and lines); and the step's log lines, streaming while the step is running. 3. A parallel step shows its branches' agent runs grouped by branch. 4. Data comes from existing endpoints. If something needed is not served (for example tool calls per stage), add the smallest read to archie-ui's existing task API, not a new service. ## Context every agent needs - The Workflows page (`ui/src/workflows/WorkflowsPage.vue`, `WorkflowEditor.vue`) is archie-core's main operator surface: a Vue Flow canvas (`WorkflowCanvas.vue`, nodes in `StepNode.vue`, layout in `workflow-graph.ts`) that both edits a workflow definition and watches its runs. Edits are edits to the YAML document (`workflow-edit.ts`), so the canvas and the YAML tab never disagree. Read `WORKFLOWS.md` (repo root) for the workflow language. - The watched run comes from `useWorkflowRuns` (`workflow-runs.ts`): `GET /api/tasks` filtered by workflow, and `GET /api/tasks/{id}/attempts` for its recorded steps (stage rows: name, status ok|failed|interrupted|running, duration_ms, error). A step is recorded under its `id`, else its type. Live refresh is `useLiveResource("tasks", ...)` over the SSE stream. - Slide-in panels over the right edge of the canvas (`StepEditor.vue`, `WorkflowSettings.vue`) are the pattern for details and editing. Do not add a permanent side panel. - UI bar the maintainer has set (memory: canvas UI taste): direct manipulation (right-click menus, inline + points, panels that open on demand), no instructional filler text, the field that matters first, help text on hover, nothing that makes the page scroll when the canvas could pan. Drive every change in a headless browser (Playwright with the system Chrome works; stub `/api/**` with `page.route`) and look at screenshots at 1920x947 before calling it done. - AGENTS.md rules apply: cheapest change first, services own contracts (the dashboard reaches other services only through archie-ui's HTTP API and their gRPC contracts), no new binaries, regenerate and commit `ui/dist` with the change, `task check` gates the commit, tests only for the seams AGENTS.md lists. ### Acceptance criteria - With a run watched, clicking a step that ran opens its Run details; clicking one that did not run opens the editor. - The details show status, duration, full error, agent summary, tool calls, tokens, captured changes and log lines for exactly that step (verified against a real or recorded run of implement or tdd). - A running step's log and tool calls update live without reloading. - No new binary, no new gRPC service; any new read is on archie-ui's task API. `task check` passes; screenshots reviewed at 1920x947. ### Close reason Implemented canvas Run/Definition step inspector with persisted agent summaries and tokens, step-attributed tool calls, branch grouping, captures and live stage logs. Full task check passed on committed tree; Chrome at 1920x947 verified fixture-based run details, live updates, scope, failed steps, branches, and delayed run switching. No live deployment exercised. --- _Imported from beads `archie-core-t19m.5` · GitHub #1405 · type feature · priority P1 · created 2026-10-05 · closed 2026-10-05_
sam added the highfeature labels 2026-10-27 13:36:17 +00:00
sam self-assigned this 2026-10-27 13:36:17 +00:00
sam closed this issue 2026-10-27 13:36:17 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#427