docs(prd-0019): active agents in dashboard + agent-scoped edit verbs #38
Reference in New Issue
Block a user
Delete Branch "dashboard-active-agents"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Draft PRD for adding a first-class "active agents" pane to the dashboard TUI and reshaping the operator
routes edit(e) /pipelock edit(p) verbs to be agent-scoped when the cursor is in the agents pane.After this PRD the dashboard answers two questions on one screen — what's queued for me to act on (existing proposals), and what's currently running that I might want to push a config edit to without a prompt (new active-agents list).
Tabtoggles which pane the nav keys move through;e/ptarget the selected agent directly when the cursor is in the agents pane, and fall back to today's global discover-and-prompt when the cursor is in the proposals pane.Sized into 4 chunks:
e/pSix open questions called out — the biggest is whether per-bottle
compose pson every 1s refresh tick scales for hosts with many bottles (leaning toward one label-filtereddocker psto bucket bycom.docker.compose.projectlabel).PRD 0019 chunk 1. New `discover_active_agents()` in dashboard.py returns one `ActiveAgent(slug, agent_name, started_at, services)` per currently-running compose project: - Slugs come from `list_active_slugs()` (chunk-5 shared helper). - The service set per project comes from ONE label-filtered `docker ps` call (PRD open question #1: avoids N per-bottle `compose ps` invocations on each 1s refresh tick). - agent_name + started_at come from each bottle's metadata.json; "?" / "" fallbacks when the file is missing so the row renders rather than vanishes. Not wired into the TUI yet — chunk 2 renders the agents pane. The parser (`_parse_services_by_project`) is split out as a pure function so the conditional-input shape can be unit-tested without docker.