Expand description
TeamSnapshot — point-in-time read of the dogfood team that the UI
renders against. Built by walking up to the nearest .team/,
parsing team-compose.yaml, querying the supervisor for each
agent’s process state, and aggregating a small set of mailbox
counters (unread + pending approvals).
Read by both App::tick() (live refresh every second) and the
snapshot tests (constructed manually). The snapshot is intentionally
cheap to build — every field is derived from a single SQL query
per agent — so refresh cadence stays well under tmux’s own
capture-pane cost.
Structs§
- Agent
Info - Per-agent fields the UI reads to render the roster + drive selection / detail-pane streaming.
- Channel
Info - One channel exposed in
team-compose.yaml. Used by PR-UI-6’s per-channel broadcast picker and by the Mailbox-first layout’s channel list.idis<project>:<name>(matches the broker’schannels.id);nameis the short label rendered as#name. - Team
Snapshot
Functions§
- agent_
label - Return the operator-facing label for
agent_id: the agent’sdisplay_namewhen set, otherwiseagent_iditself. Read-only borrow into the snapshot — callers that need an ownedStringcan.to_string()at the use-site. Unknown ids fall through toagent_id(the canonical id is always a valid label). - state_
glyph - Single-cell glyph for an agent’s primary state — derived from the
triplet (
state,pending_approvals,unread_mail) in priority order: pending approval beats unread mail beats process state. Plain ASCII fallback when the caller signals a monochrome / no-symbol terminal.