Skip to content

core+app: the agent fleet — live roster, fleet strip, sidebar badge#30

Merged
alejandro-nexcade merged 2 commits into
mainfrom
alejandro/agent-fleet
Jul 3, 2026
Merged

core+app: the agent fleet — live roster, fleet strip, sidebar badge#30
alejandro-nexcade merged 2 commits into
mainfrom
alejandro/agent-fleet

Conversation

@alejandro-nexcade

Copy link
Copy Markdown
Collaborator

What

PR 6/7 of the overnight UX program (Track C — cockpit-docs/OVERNIGHT_UX_PLAN.md, mockups C1+C2). Stacked on #29.

  • Backend: AgentRun.model: string | null threaded from the spawn config; new agent-started event with typed payload, emitted once from start_stream_forwarding — the single choke point all five spawn modes pass through (verified: fix/review/plan/fan-out/restack). Best-effort emit, never blocks a spawn (§0.1).
  • Agents view rebuilt (the nav entry was a prompt editor): Active roster — pulsing LED (respects reduced-motion), mode tag, PR + branch, model, shared-interval elapsed clock, live last action from the multiplexed agent-event stream, View → lands on that PR's Agent tab (pendingAgentFocus, nonce-keyed like pendingDiffJump), Stop → existing confirm-gated kill_agent (review agents only). Recent (24h) — session-observed completions enriched with lazy TrajectorySummary fetches (≤10). Prompts sub-tab keeps the full AgentEditor.
  • FleetStrip: slim bottom bar on every view (including inside the review workspace), one chip per running agent, capacity note at max_parallel_agents, hidden entirely when idle. Sidebar Agents badge shows the live count.
  • Roster derives from state the app already has — zero polling; agent-started/agent-completed trigger the refetches.

Verified

cargo fmt --check · clippy -D warnings · cargo test (568) · tsc · vitest 341 · vite build — all green. Reviewer pass: SHIP; exhaustiveness NIT fixed. Known follow-up noted for later: per-spawn fetchReviews bursts during large fan-out waves (consistent with the existing completion-handler pattern).

🤖 Generated with Claude Code

@LifeLex LifeLex force-pushed the alejandro/diff-strip-card-chips branch from 1068e2f to f08887c Compare July 3, 2026 08:40
@alejandro-nexcade alejandro-nexcade changed the base branch from alejandro/diff-strip-card-chips to main July 3, 2026 08:42
LifeLex and others added 2 commits July 3, 2026 09:42
Make every running agent visible at a glance (overnight UX program PR 6,
mockups C1 + C2).

core/app:
- Add `model: Option<String>` to `AgentRun`, threaded from `SpawnConfig`
  (recorded by `with_model`); regenerate the ts-rs binding as `string | null`.
- Emit a new `"agent-started"` Tauri event once per spawn from the single
  `start_stream_forwarding` choke point (covers Fix/Review/Plan/Implement/
  Restack), payload `{ object_id, mode, pid, started_at_epoch_ms, model }`.

frontend:
- `lib/fleet.ts`: pure, tested roster derivation from the reviews/projects the
  store already holds (no polling, no list command); plan agents key by the
  project's ProjectId (== agent object_id) via `project.plan`.
- Agents view rebuilt with Active | Prompts sub-tabs; Active shows the live
  roster (pulsing amber LED, mode tag, ref+branch, model, ticking mm:ss, last
  action, View/Stop) + a session-observed Recent (last 24h) section enriched
  with trajectory summaries; Prompts mounts the existing AgentEditor unchanged.
- Always-on `FleetStrip` rendered outside the view switch (visible everywhere,
  hidden when idle); amber Agents sidebar badge; capacity chip at max.
- Global `agent-event` listener feeds an `agentActivity` store slice (roster
  "last action"); `agent-started` seeds it and refreshes lists; `agent-completed`
  accumulates Recent. View deep-links via a typed `pendingAgentFocus` hint that
  lands ReviewWorkspace on the Agent tab.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@LifeLex LifeLex force-pushed the alejandro/agent-fleet branch from c3dd179 to 3ead751 Compare July 3, 2026 08:42
@alejandro-nexcade alejandro-nexcade merged commit 5e86661 into main Jul 3, 2026
2 checks passed
@LifeLex LifeLex deleted the alejandro/agent-fleet branch July 3, 2026 08:48
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.

2 participants