Expand description
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.
The detail pane in PR-UI-2 polls the PaneSource once per
refresh tick (currently 1s, same cadence as the roster) and
re-renders. For PR-UI-3 / PR-UI-4 a streaming tmux pipe-pane
variant can implement the same trait without changing callers.
Modules§
- test_
support - Test fixtures. Made
pub(rather than#[cfg(test)]) so sibling modules’ tests (e.g.app) can reach them — same pattern askeysender::test_supportandcompose::test_support.
Structs§
- Tmux
Pane Source - Production implementation — shells out to
tmux capture-pane.-epreserves ANSI escape sequences (T-074 bug 3 fix; without-ethe captured output is colour-stripped and the detail pane renders as monochrome regardless of terminal colour mode).-Jjoins wrapped lines,-pwrites to stdout,-S -3000pulls the last 3000 lines of scrollback. Order of flags is incidental; keep-eadjacent to the other capture-shape flags for grep.
Traits§
- Pane
Source - Lookup contract: given a tmux session name, return its scrollback
as a list of lines. Implementations may bound the depth — the
production tmux variant takes the last 3000 lines via
capture-pane -S -3000, matchingteamctl logs.
Functions§
- tail_
lines - Take the last
nlines so the detail pane never overruns its rect. Free function so tests can pin the slice without constructing a widget.