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/, parsingteam-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.- keysender
- Key forwarding — abstracts how the UI streams keystrokes into a
tmux pane so tests can stub it out. Production hits
tmux send-keys; tests pass aMockKeySenderrecording every call. Mirrors the trait + prod + mock shapepane.rsuses for capture so the two surfaces evolve together. - 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 aMockPaneSourcewith canned lines. - pane_
resize - Detail-pane → inner-tmux-session size sync.
- 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 teamctlwhen the wordmark changes. - status_
bar - Bottom status bar — operator-orientation strip beneath the existing keybindings statusline. Two slots:
- statusline
- Bottom statusline —
·-separated key hints contextual to the focused pane, with the always-visible· t tutorialhint 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
Capabilitiesvalue down to widgets so colour choices stay consistent across a single session even if the env mutates. - triptych
- Triptych — the default Layout A. Sidebar + right-stack: an Agents column on the left (current sidebar width), with Detail stacked above Mailbox at 50/50 on the right. An Approvals stripe is reserved at the top (rendered only when there’s something to surface) 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 atstate/mailbox.db.