Repository navigation
Open
Labels
Milestone
Description
Summary
Every modal footer joins its hints into one string and truncates it at the terminal edge (render_footer in tui/modal/chrome.rs, about ten call sites). On a narrow terminal the cut can land mid-hint ("Ctrl+A for arc"), and the hints that get dropped are whichever come last, whether or not they matter. The /resume footer also mixes key hints with status (the session count, "more not loaded", the scope), so status text takes up room the keys need.
Design
- Structured hints. A hint is a key plus a label plus a priority, and is taken from the same named-action table that Archive and unarchive sessions from the /resume picker #280 introduces for the
/resumepicker. Status such as counts and scope stays separate from key hints and gets its own place, for example a right-aligned segment or the header description. - Fit whole hints by priority. Render as many whole hints as fit, highest priority first, keeping them in their declared order. Never cut a hint in the middle. When any are dropped, end the row with a hint for the key overlay, such as
? keys. At very narrow widths, fall back to each action's short label. - Key overlay. One key opens an overlay listing every action in the current context with its key and full label, generated from the action table. Pickers with a filter need a key that cannot collide with filter input:
?while the filter is empty, or another key verified against the line editor's bindings. - Hint style. Every hint renders as
Key label, with the key in boldtextand the label inmuted, and hints are joined by·. Each key has one spelling everywhere:Esc,Enter,Tab,Ctrl+End,↑ / ↓. Today the approval prompt writes[Y] approve [N] deny, pickers writeEnter to confirm · Esc to cancel, and the jump-to-bottom pill writes(ctrl+End)while the welcome tip saysCtrl+End. Every footer paints indim, so keys and labels carry equal weight. Codex renders footer keys in bold and their labels dimmed (codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__approval_overlay__tests__network_exec_prompt.snap). - Rejected alternatives. A scrolling marquee moves under the reader's eye, can't be read mid-scroll, and keeps the screen redrawing. Wrapping hints onto extra rows makes the layout jump when the terminal is resized.
Acceptance criteria
- All modal footers, plus the approval prompt and the chat input hints, render structured hints through one fitting routine, and no hint is cut mid-word at any width.
- Hints keep their declared order, and lower-priority hints are dropped first. Whenever a hint is hidden, the row ends with a pointer to the key overlay.
- The key overlay lists every action available in the current context, generated from the same table that dispatches the keys.
- Status text in the
/resumefooter no longer competes with key hints for the row. - Every hint, including the status bar's interrupt hint and the jump-to-bottom pill, uses the shared style and one spelling per key, and a style test pins the key and label styles.
- Render tests cover a wide, a medium, and a very narrow width for at least the
/resumepicker and the approval prompt. - This builds on Archive and unarchive sessions from the /resume picker #280's action table, and Customize TUI key bindings #278 rebinds keys through the same table, so hints always show the bound key.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity
feat(tui): archive and unarchive sessions from the /resume picker (#294)
feat(tui): expand truncated tool output and collapse finished thinking (