Skip to main content

Crate teamctl_ui

Crate teamctl_ui 

Source
Expand description

Library half of the teamctl-ui crate. Holds the app loop and the widget rendering primitives so integration tests can drive them against a ratatui::buffer::Buffer without spinning up a real terminal. The thin main.rs binary owns terminal lifecycle only.

Modules§

app
App state and the top-level run loop.
approvals
Approvals — the conditional stripe + the a-key modal.
compose
Send-mail compose modal — multi-line vim-style editor + CLI send.
data
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).
help
? help overlay — keymap registry + grouped binding list.
layouts
Alternate main-view layouts (PR-UI-6).
mailbox
Mailbox-pane data source and tab definitions.
onboarding
Onboarding tutorial — multi-step walkthrough of the TUI.
pane
Pane capture — abstracts how the UI reads the focused agent’s tmux scrollback so tests can stub it out. Production hits tmux capture-pane; tests pass a MockPaneSource with canned lines.
splash
Splash screen widget — figlet-isometric4 logo, version + team line, help-hint footer. Shown for ~3 seconds at launch (or until a key press) before the Triptych takes over. The art is vendored as a static asset; regenerate with figlet -f isometric4 teamctl when the wordmark changes.
statusline
Bottom statusline — ·-separated key hints contextual to the focused pane, with the always-visible · t tutorial hint pinned to the right per SPEC §4. Styles inactive hints muted so the contextual ones read as the actionable surface.
theme
Terminal capability detection — picks the colour fidelity teamctl-ui renders at. Read once at startup; the rest of the UI passes the Capabilities value down to widgets so colour choices stay consistent across a single session even if the env mutates.
triptych
Triptych — the default Layout A. Three resizable panes (roster, detail, mailbox) with an Approvals stripe reserved at the top (rendered only when there’s something to surface — empty in PR-UI-2 still) and a focus ring on the active pane.
tutorial
First-launch detection via a marker file under the user’s config directory. PR-UI-1 ships only the plumbing: is_completed() reads the marker; the actual onboarding tutorial that writes the marker lands in PR-UI-7.
watch
notify-based file-watch on the broker SQLite at state/mailbox.db.