Skip to content

feat: rebuild the console around runs, events, and sandboxes - #51

Merged
winterfx merged 1 commit into
mainfrom
refactor
Sep 29, 2026
Merged

winterfx merged 1 commit into
mainfrom
refactor

Conversation

@winterfx

Copy link
Copy Markdown
Collaborator

Summary

Reorganizes the console so a failure can be followed from what triggered it to where it ran, with denser and calmer screens.

  • Navigation — five sections: Runs, Projects, Automation, Resources, System. Former pages live under section tabs. Audit logs, API tokens, and sign-in info move to an account menu (bottom of the sidebar), since they belong to the UI server rather than agent-compose.
  • Runs (home) — one filterable, day-grouped run list (status / project / agent / source / time window, synced to the URL) with an inspector: error text, latest activity from RunEvent, the agent's recent runs, and run info. J/K/Enter navigation. Replaces the overview page and the unlinked-runs page.
  • Webhook events — events grouped by correlation ID (one row per task); dots only mark abnormal delivery (no subscriber, dead letter).
  • Event detail — a trace tree: event → the automation executions it fanned out to → their sandboxes. Retried and unsubscribed events of the same task are shown; the latest failed execution is selected by default; each execution lists its scheduler events.
  • Sandboxes — sandbox ID first; running sandboxes pinned on top; the latest automation execution per sandbox from BatchGetLatestSchedulerRuns.
  • Run detail — header with status, exit code, trigger, and the raw error; tabs aligned with the sandbox workbench (run logs, activity, agent records, conversation, terminal).
  • Logs — a shared log buffer (src/model/log-buffer.ts): incremental line splitting, a 5,000-line in-memory cap, and "load earlier" in 256 KB steps by byte offset. Used by run and sandbox logs. Streamed agent output is merged every 100 ms and long conversation outputs are folded.
  • Visual system — warm neutral tokens, ink primary buttons, dot + text statuses, no page descriptions, "Sandbox" as the single term for execution environments.

Principles applied

  • UI features rely only on structured proto fields (status, exit_code, RunEvent.kind/exit_code, delivery event_id, …); error text is shown verbatim and never parsed.
  • IDs are not used as labels (except the Sandbox list, whose subject is the sandbox itself).

Backend load

  • Home auto-refresh (15 s) fetches one list page; the five status counts are recomputed at most once a minute. The inspector loads only after the selection settles for 250 ms.
  • Scheduler lookups by ID use GetScheduler(scheduler_id) (agent-compose #692) and fall back to listing schedulers on older daemons.
  • The Sandboxes page issues 4 requests per page load (previously one request per row).
  • The Sandboxes page reads project names from project-summaries instead of project-agent-context.

API / server changes

  • Regenerated src/gen/agentcompose/v2 from ../agent-compose/proto with npm run gen:api (no hand edits).
  • Removed the UI-server endpoint GET /api/ui/v1/runs/unlinked (internal/runindex); those runs appear in the home run list.
  • No new environment variables; nginx routing unchanged.

Test results

  • npm run check:ui — passes
  • npm run lint:ui — passes
  • go test ./... — passes
  • npm run format:check — only src/api/resources.ts, src/lib/components/brand-logo.svelte, src/routes/Projects.svelte are reported; they were already unformatted on main and are untouched here.
  • Playwright e2e against a local daemon: no new failures compared with main. The remaining failures also fail on main in this environment (they need a live webhook/OctoBus/terminal setup or pre-seeded projects). Updated specs for the new navigation, headings, tabs, and the removed unlinked-runs route.
  • Performance, with mocked streams in a browser:
    • 200,000-line run log: first lines in ~0.5 s; the longest main-thread task was ~200 ms; ~40 DOM rows.
    • 50,000-line conversation output: 38 ms and no long tasks.
  • Checked read-only against the devboard-new daemon: run list, grouped webhook events, trace trees for retried (12 events / 10 executions) and fanned-out tasks, and the Sandboxes list.

Screenshots

Visible UI changes throughout; screenshots to be attached by the author.

Follow-ups

  • The home run list only covers agent runs; automation executions (the bulk of devboard traffic) need a cross-scheduler ListSchedulerRuns in agent-compose to join the same timeline.
  • agent-compose indexes on project_run all start with project_id; status/time filters without a project (home counts) cannot use them.
  • Filter sandbox logs to one execution's time window when a sandbox is shared by several executions (currently only flagged).
  • Auto-resume log streams after the 300 s nginx read timeout.

🤖 Generated with Claude Code

Reorganize the UI so a failure can be traced from what triggered it to where
it ran, with denser, calmer screens.

- Navigation: five sections (Runs, Projects, Automation, Resources, System);
  former pages move under section tabs. Audit logs, API tokens, and sign-in
  info move to an account menu because they belong to the UI server itself.
- Runs home: one filterable, day-grouped run list with a keyboard-driven
  inspector (error, latest activity, recent runs). Replaces the overview and
  the unlinked-runs page, which is removed together with its UI-server index.
- Event detail: a trace tree of event -> fanned-out automation executions ->
  sandboxes, including retried and unsubscribed events, defaulting to the
  latest failure. The webhook event list groups events by correlation ID.
- Sandboxes: sandbox ID first, running sandboxes pinned, latest automation
  execution via BatchGetLatestSchedulerRuns.
- Run detail: status/error header; tabs aligned with the sandbox workbench
  (run logs, activity, agent records, conversation, terminal).
- Logs: a shared log buffer (incremental line split, 5,000-line cap,
  256 KB earlier-log steps) used by run and sandbox logs; streamed output is
  batched and long conversation outputs are folded.
- Backend load: auto-refresh fetches one page, status counts refresh at most
  once a minute, the inspector loads after selection settles, and scheduler
  lookups use GetScheduler(scheduler_id) with a fallback for older daemons.
- Visual system: warm neutral tokens, ink primary buttons, dot + text
  statuses, and "Sandbox" as the single term for execution environments.
- Regenerate the agentcompose/v2 client from ../agent-compose/proto.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@winterfx
winterfx merged commit 70d5dec into main Sep 29, 2026
2 checks passed
@winterfx
winterfx deleted the refactor branch September 29, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant