Expand description
The picker’s rows, laid out here rather than in awk.
Step 2 of removing fzf. The awk this replaces exists to hand fzf one TSV line per row with the colours already burned in as escape sequences; that format dies with fzf, so the layout is ported into structured cells and the ANSI is reduced to one renderer used for testing.
The layout itself is not being redesigned. Every rule here was arrived at by looking at real lists and most of them fix a specific bent row, so they are ported as they stand and the reasoning is kept with them:
- The summary follows the label directly, because it is what the list is read for. Everything that only says WHERE a session is (path, agent, version) is pinned to the right edge, in fixed columns, so it costs the summary no width and is what a too-long row truncates away.
- Every column width is measured over the WHOLE list, never per row. Sizing the trailing block per row moved the path column by however long that row’s agent happened to be, up to 9 columns apart on a mixed list.
- The label column has a floor of 15 in a roomy window and a cap of 15 in a narrow one, and the floor only applies when the list holds real pane labels.
The one deliberate improvement is vlen: the awk counts characters, this
counts display columns, which is the same answer for everything on an ordinary
list and the right one for a double-width character.
Structs§
- Cell
- Input
- Paint
- The paint a cell carries, stored as the SGR prefix the awk emits so the ANSI renderer is exact, with the ratatui mapping beside it so the TUI never parses its own escape sequences back.
- Row
Constants§
- LABEL_
CUR - The label of the pane the picker was opened from.
- LABEL_
OTHER - MARK_
INPUT - A session asking for you: the one glyph here worth a colour of its own.
- MARK_
RESTART - A restart in flight. Cyan rather than the waiting star’s bold yellow: it wants nothing from you, it is just not finished, and it should not compete with the one glyph that means “this row is asking”.
- MARK_
RUN - Working, dimmed, because it wants nothing from you.
- MODE_
ASK - The permission mode rides on the agent name as brightness rather than taking a column: louder is less supervised.
- MODE_
AUTO - MODE_
EDIT - PATH
- PLAIN
- VER_OK
- VER_
STALE - A session running code a self-update has already replaced. Plain yellow, not the bold yellow of the star, since nothing is being asked of you.
Functions§
- build
- summary_
of - Whatever marker the title leads with, taken off so the column can be filled from the STATE instead. The title shows the same star for all three states (and sometimes a spinner frame that means nothing in particular), so the glyph it carries is dropped rather than shown.