Expand description
Stateless TUI widgets.
Each widget takes explicit props; the compose function in
render::mod pulls those props from State per frame. No widget
holds a reference to any god-object.
The glyph vocabulary, one meaning each (no emoji, no dingbats – CI bans them; geometric shapes and box drawing are below the banned ranges):
>the user’s prompt●the start of a block: an assistant reply, a tool call⎿the result or continuation under a block◦a live child row (a running agent)√ ■ □ ⊘checklist states: done, in progress, pending, blocked◐ ◓ ◑ ◒the spinner·the only separator inside meta text
Every meta surface – footer, session header, spinner meta, agent rows,
checklist meta, run summary, system notices – uses the theme’s single
text_meta colour, undimmed.
Structs§
- Agent
Panel Row - One row of the live agent panel: a running (or backgrounded) subagent’s
stable identity + activity. Built by the render layer from
TurnState::ExecutingTools+live_tool_status(+ the background-agent registry); this widget only formats. - Approval
Modal Widget - Chat
State - State for the chat widget
- Chat
Widget - Props for
ChatWidget - Conversation
List Widget - File
Picker Widget - Image
Click Target - Entry in the click map: maps a content line to an image in chat history
- Input
State - State for the input widget
- Input
Widget - Props for
InputWidget. The slash-command palette is rendered separately asSlashPaletteWidgetin the bottom region (seerender.rs); this widget just draws the bordered input box. - Model
Picker Widget - Question
Modal Widget - Rewind
Picker Widget - Slash
Palette Widget - Status
Widget - The one-line footer under the composer: the session’s mode on the left,
the model and the context gauge on the right, everything in the theme’s
meta colour. What it deliberately does not show:
user@host(the shell prompt and the window title already do), the working directory (the session header names it once), and the version (mermaid --version,/doctor). A footer is furniture; it should carry what changes.
Enums§
- Generation
Status - Local-to-render-layer generation phase enum. The compose function
converts from
domain::TurnState+domain::GenPhaseinto one of these four states; widgets render off this local view so they don’t need to pattern-match the full domain enum.
Constants§
- MODEL_
PICKER_ HEIGHT - Total pane height including borders and the filter line.
- SESSION_
HEADER_ HEIGHT - Rows the header takes when visible.
Functions§
- abbreviate_
home ~for the home directory itself,~/restbeneath it (joined, so Windows keeps its separator), the path unchanged otherwise.- build_
session_ header - The two header lines, both in the meta colour, each fitted to
width. - build_
status_ lines - Build the status-line rows: a generation/tool spinner followed by one row per queued message.
- build_
task_ lines - Build the checklist rows for the reserved zone.
collapsedis the Ctrl+T one-line form.attachedmeans the status zone renders above, so the first row carries the⎿connector; detached rows sit flush-left.widthis the zone’s inner width in cells. - question_
modal_ height - Total rendered height including the border, so
render::modcan size the bottom zone to fit the modal — the taller of the option list and its preview. - rendered_
row_ count - How many rendered rows
inputoccupies atcontent_widthdisplay cells. - session_
header_ visible - Visible while every committed message is a system notice and no turn is
running. Not
messages().is_empty(): the startup web-capability notice is a system message that only appears on degraded machines, and keying on it would make the header (and the pty frames CI compares) environment- dependent./clearbrings the header back;--resumewith content hides it. - spinner_
glyph - The frame for a given elapsed time. A pure function of the injected
clock, so
--replayreproduces every frame. - tasks_
height - Height the layout should reserve for the checklist zone.
- tasks_
visible - Whether the checklist band renders at all: there must be something to
show, and a fully-green list retires once the run goes idle (finished
work stays visible only while unfinished work remains). Collapsed with no
status widget above (
attachedfalse) renders nothing — the state persists and the one-liner reappears when the next run starts.