docs(prd-0019): active agents in dashboard + agent-scoped edit verbs #38

Merged
didericis merged 3 commits from dashboard-active-agents into main 2026-05-26 01:14:16 -04:00
Owner

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). Tab toggles which pane the nav keys move through; e / p target 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:

  1. Discovery helper + dataclass (pure, mockable)
  2. Render the agents pane (no selection model yet)
  3. Selection state + Tab toggle
  4. Agent-scoped e / p

Six open questions called out — the biggest is whether per-bottle compose ps on every 1s refresh tick scales for hosts with many bottles (leaning toward one label-filtered docker ps to bucket by com.docker.compose.project label).

## 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). `Tab` toggles which pane the nav keys move through; `e` / `p` target 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: 1. Discovery helper + dataclass (pure, mockable) 2. Render the agents pane (no selection model yet) 3. Selection state + Tab toggle 4. Agent-scoped `e` / `p` Six open questions called out — the biggest is whether per-bottle `compose ps` on every 1s refresh tick scales for hosts with many bottles (leaning toward one label-filtered `docker ps` to bucket by `com.docker.compose.project` label).
didericis added 1 commit 2026-05-26 00:58:53 -04:00
docs(prd-0019): active agents in dashboard + agent-scoped edit verbs
test / unit (pull_request) Successful in 17s
test / integration (pull_request) Successful in 1m3s
9539982d3f
Draft a PRD that adds an "active agents" pane to the dashboard
TUI (below the existing proposals pane) and reshapes the operator
`routes edit` (e) / `pipelock edit` (p) verbs to be agent-scoped
when the cursor is in the agents pane — no more global discover
+ disambiguation prompt on every press. Tab toggles which pane
nav keys move through.

Sized into 4 chunks (discovery helper → render pane → selection
state → agent-scoped verbs). Six open questions called out, the
biggest being whether per-bottle `compose ps` on every 1s tick
scales for hosts with many bottles (answer leans toward one
label-filtered `docker ps`).
didericis added 1 commit 2026-05-26 01:03:26 -04:00
docs(prd-0019): drop e/p fallback — selection-only, no-op otherwise
test / unit (pull_request) Successful in 18s
test / integration (pull_request) Successful in 1m6s
9c9c32a941
When no agent is selected, `e` / `p` do nothing (status line
shows "no agent selected") rather than falling back to today's
global discover-and-prompt. The discover-and-prompt scaffolding
in `_operator_edit_routes_flow` / `_operator_edit_allowlist_flow`
comes out entirely — selection in the agents pane is now the
only way to scope an edit. Old open-question #4 (single-bottle
shortcut behavior in proposals-pane mode) is moot and removed.
didericis added 1 commit 2026-05-26 01:11:57 -04:00
feat(dashboard): discover_active_agents helper + ActiveAgent dataclass
test / unit (pull_request) Successful in 18s
test / integration (pull_request) Successful in 1m6s
6e4a9f606f
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.
didericis merged commit 8636982e80 into main 2026-05-26 01:14:16 -04:00
Sign in to join this conversation.