core+app: the agent fleet — live roster, fleet strip, sidebar badge#30
Merged
Conversation
1068e2f to
f08887c
Compare
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>
c3dd179 to
3ead751
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR 6/7 of the overnight UX program (Track C —
cockpit-docs/OVERNIGHT_UX_PLAN.md, mockups C1+C2). Stacked on #29.AgentRun.model: string | nullthreaded from the spawn config; newagent-startedevent with typed payload, emitted once fromstart_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).pendingAgentFocus, nonce-keyed likependingDiffJump), Stop → existing confirm-gatedkill_agent(review agents only). Recent (24h) — session-observed completions enriched with lazy TrajectorySummary fetches (≤10). Prompts sub-tab keeps the full AgentEditor.max_parallel_agents, hidden entirely when idle. Sidebar Agents badge shows the live count.agent-started/agent-completedtrigger the refetches.Verified
cargo fmt --check·clippy -D warnings·cargo test(568) ·tsc·vitest341 ·vite build— all green. Reviewer pass: SHIP; exhaustiveness NIT fixed. Known follow-up noted for later: per-spawnfetchReviewsbursts during large fan-out waves (consistent with the existing completion-handler pattern).🤖 Generated with Claude Code