Repository navigation
navigator: one shape per session state, one spinner, a reserved gutter - #709
Merged
Merged
Conversation
added 3 commits
September 17, 2026 02:51
Waiting and Interrupted both rendered `!`, so "blocked on you" and "no recoverable runtime" — the two states an operator most needs apart — were the same glyph. Interrupted takes `∅`; a test now pins that no two lifecycles share a marker, with Ready the only one allowed none.
The navigator's session list is the only multi-session surface, and it spoke three glyphs for eight states: failed, cancelled and interrupted rows all rendered `○` idle, and `working` was a static quarter circle one state away from the empty ring. Phases 1-4 of the session-row plan (design record: FORGE-DESIGN.md §7.7; the working notes under docs/mockups/session-rows/ are gitignored). Vocabulary: eight row states, one shape each — `○` idle, the turn line's braille spinner for working, `●` needs you, `⇥` queued (all four list-local), and `✓ ✗ ■ ∅` borrowed from `TurnLifecycle` so the list and the transcript cannot disagree about how a turn ended. Precedence is attention → queued → working → lifecycle. This fixes the row that rendered `○` for failed, cancelled and interrupted alike. Motion: the running glyph steps on `TuiApp::session_row_step`, advanced by the event-loop tick while any session is working — not the wall clock, and not `BusyState::throbber()`, which only ticks for the workspace-visible session. Rows are staggered by index so a column of running sessions is not one metronome, and the collapsed chip carries the same frame. Chrome: a row is five reserved cells and an elastic label (`bar marker space glyph space label`), so no state — selection, hover, expansion — can move another row's label. Selection is the accent bar in the gutter plus a ground across both lines; the cursor cell is disclosure (`›` collapsed, `⌄` expanded, and `›` again under the pointer). While the navigator holds the keyboard the ground is the neutral `selection` step; when it does not, the row keeps the bar and a weight step and gives up the ground (§8.5). The mock's `accent_soft` wash is deliberately not used: §8.4 bars filling the active block with accent, and §8.6 pins `selection` as the strongest neutral ground so hover can never impersonate a selection. Peek: the expanded row is framed in a rounded accent box whose left edge takes the reserved gutter and whose right edge the list's last column; the peek hangs below it behind one guide rule — last answer (a `[forge.turn_failed]` marker in the error hue), reply box, hairline, then the §6 hint grammar. The frame is drawn only when the whole block fits, so a short pane falls back to the unframed layout rather than painting half a box. The hint row asks for the reply pair when both pairs do not fit: the shared grammar drops verbs before pairs, which at the navigator's 25 columns at 120 would have left the useless `Enter Esc`. Tests run: `cargo test --locked --package forge-tui --lib <filter>`, one filter per run — `widgets::navigator` 35, `multi_task` 53, `mouse` 28, `nav` 66, `peek` 5, `collapsed_chip` 1, `status` 77, `footer` 51, `throbber` 1; plus `cargo fmt --all -- --check` and `cargo clippy --workspace --all-targets --locked -- -D warnings` (clean). Not run: the full workspace suite (AGENTS.md: agents must not).
§7.7's "only three states are user-facing" was the bug, written down: it named `◐ working` for a row whose glyph can be eight different shapes. The section now carries the shipped table, the reserved columns, the bar-plus-ground selection grammar with its `§8.5` mute, the `›`/`⌄` disclosure split, and the framed expanded row with its guide rule, reply box, hairline and hint row. §9.3's working meter claimed "one quarter-circle glyph from the same ◐◓◑◒ family the turn line speaks". Both halves were false — no quarter-circle rotation exists in Forge, and the turn line speaks braille. The footer is a state word with a fixed-width `●` whose brightness pulses. §5.3 now says once which glyph means running (the braille family, on the list, the turn line and the chip), and §8.6's hover marker moved from "the reserved gutter" to "the reserved marker cell" so it matches §7.7's column grammar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The navigator's session list spoke three glyphs (
● needs you,◐ working,○ idle) for eight states, so failed, cancelled and interrupted rows all rendered○idle, andworkingwas a static quarter circle one shape away from the empty ring. That is the bug; the rest is the chrome the mockups asked for.○idle ·◐working ·●needs you, everything else○○ ⣾ ● ⇥list-local,✓ ✗ ■ ∅fromTurnLifecycle›+ a one-lineaccent_softground▌bar in a reserved gutter + a ground across both linesVocabulary
Eight states, one shape each, precedence attention → queued → working → lifecycle. The four outcomes borrow
TurnLifecycle's symbols so the list and the transcript cannot disagree about how a turn ended;Waiting's old!collides withInterrupted's, soInterruptedis now∅(first commit, with a test that no two lifecycles share a marker).Motion
TuiApp::session_row_step, advanced intick_render_state()while any session is working — not the wall clock (the turn line free-runs onSystemTime) and notBusyState::throbber()(it only ticks for the workspace-visible session, so a background turn would have frozen). Rows are staggered by index; the collapsed chip carries the same frame, since on a collapsed column it is the only thing separating in-flight from waiting.Chrome
A row is five reserved cells and an elastic label (
bar marker space glyph space label), so no state — selection, hover, expansion — can move another row's label (no_state_moves_the_label_column). The cursor cell is disclosure, not selection:›collapsed,⌄expanded,›under the pointer.One deliberate deviation from the mock. The mock asked for an
accent_softselection ground muting toselectionwhen the list loses the keyboard. Shipped instead: the neutralselectionground while the navigator holds the keyboard, and no ground (bar + weight step) when it does not. §8.4 bars filling the active block with accent, §8.6 pinsselectionas the strongest neutral ground so hover can never impersonate a selection (accent_softwould have become a fourth step above it),accent_softalready means "the active tab" one row up, and §8.5's "visible but muted" is spelled in the explorer asselection_inactive()— bar, weight step, no ground.Peek
The expanded row is framed in a rounded accent box whose left edge takes the gutter and whose right edge the list's last column, so expanding moves nothing. The peek hangs below behind one guide rule: last answer (
[forge.turn_failed]marker in the error hue), reply box, hairline, then the §6 hint grammar. The frame costs a line above and below, so it is drawn only when the whole block fits — a short pane falls back to the unframed layout rather than painting half a box (a_frame_that_does_not_fit_is_dropped_whole).Second deviation. The hint row asks for the reply pair when both pairs do not fit. The shared grammar drops verbs before pairs, and the navigator is 25 columns wide at 120, so the grammar alone would have left the useless
Enter Esc. Both pairs render from 30 columns. The mock's borderedEnter/Esckey chips stayed declined —hints.rsis the one hint grammar.Design record
FORGE-DESIGN.md: §7.7 (table, reserved columns, selection grammar, framed row), §5.3 (one glyph means running, once), §4 rule 4, §8.6 (hover marker in the reserved marker cell), §9.3 — whose working meter claimed "one quarter-circle glyph from the same ◐◓◑◒ family the turn line speaks", false on both halves; the footer is a state word with a pulsing fixed-width●and the turn line speaks braille. The design walkthrough underdocs/mockups/session-rows/is local (gitignored) and was refreshed to match what shipped.Tests
Run, one filter per invocation:
cargo test --locked --package forge-tui --lib widgets::navigator— 35 (new:no_state_moves_the_label_column,selection_paints_the_bar_and_hover_never_does,the_selection_ground_covers_both_lines,an_unfocused_selection_keeps_the_bar_and_gives_up_the_ground,the_cursor_cell_shows_disclosure,the_expanded_row_is_framed_in_the_reserved_gutter,a_frame_that_does_not_fit_is_dropped_whole,a_failed_peek_line_colours_its_marker,the_peek_hints_keep_the_reply_verb_when_only_one_pair_fits)multi_task53,mouse28,nav66,peek5,collapsed_chip1status77,footer51,throbber1cargo fmt --all -- --check— cleancargo clippy --workspace --all-targets --locked -- -D warnings— cleanNot run locally: the full workspace suite (
AGENTS.mdforbids it for agents). CI'sTest and formatjob runs on this PR and is green.Commits
fix(tui): the interrupted marker.feat(tui): the vocabulary, the motion and the row chrome (phases 1–4 of the plan).docs(design): the design record.CI
Test and formatpass ·Dependency auditpass ·cargo auditpass.