Expand description
App state and the top-level run loop.
Three stages today: Splash (figlet logo for ~3s or until first
key), Triptych (the default read view, now backed by a live
team snapshot from PR-UI-2), and QuitConfirm (a modal asking
“really?”). Subsequent stacked PRs bolt on more modals and the
layout variants from SPEC §3 — those wire in by adding Stage
variants and dispatching from draw/handle_event, no
rearchitecting.
Structs§
Enums§
- Split
Orientation - Splitscreen orientation per detail-pane split (PR-UI-7 lift
of PR-UI-6’s deferred Q1).
Verticalsubdivides side-by-side (Ctrl+|);Horizontalstacks top-to-bottom (Ctrl+-). - Stage
Functions§
- draw
- handle_
event - refresh
- Refresh the team snapshot + the focused agent’s pane capture +
the mailbox tabs (PR-UI-3). Pulled out so tests can drive a
single tick deterministically against
MockPaneSourceandMockMailboxSourcewithout going through the event loop. - refresh_
approvals - Approvals-only refresh. Extracted on the same shape as
refresh_mailbox— PR-UI-5+ can call it on its own cadence (e.g. in response to anotifysignal) without re-running the heavier paths. Errors degrade to “no pending” so the stripe just hides on a transient broker read failure. - refresh_
mailbox - Mailbox-only refresh — extracted so PR-UI-4+ can call it on its
own cadence (e.g. in response to a broker INSERT signal) without
re-running the heavier compose + tmux capture path. PR-UI-3
just calls it from the main
refreshonce per tick. - render_
to_ buffer - Render the entire UI into a
Bufferat fixed size — used by the snapshot tests. Mirrorsdrawexactly but doesn’t require aTerminal. Update both in lockstep when adding new stages. - run
- sync_
focused_ pane_ size_ to - T-199: push the focused agent’s inner tmux pane to match the Detail rect teamctl-ui will draw into. No-op when: