Repository navigation
feat(tui): round 2 spacing, hover hierarchy and queued-row hover - #657
Merged
Merged
Conversation
Push the airy pass one step further and make hover honest about what is clickable, without changing behaviour, focus ownership or persistence. Spacing - PANE_PAD_X 2 -> 3, PANE_GAP_X 1 -> 2, CHROME_GAP_Y 1 -> 2; pane text now starts four cells in (border + padding) and panes and chrome no longer touch. - New COMPOSER_GAP_Y (2) for the transcript-composer gutter, gated on AIRY_MIN_ROWS so 80x18 collapses to the old single row. - Airy density adds one blank row after the You and Answer speaker labels, so a label reads as a heading rather than a prefix. - Delete the dead metrics TURN_GAP_H, REQUEST_GAP_H, COMPOSER_PAD_Y and TRANSCRIPT_MAX_W (no references outside design.rs) and pin the live ones in the metric test. Colour - Restore the selection > hover hierarchy: dark surface_hover #2E2E2E -> #303030 and selection #292929 -> #373737; light surface_hover #D4D4D4 -> #D0D0D0 and selection #E2E2E2 -> #C8C8C8. Selection depth is capped by the WCAG AA tag-on-selection check; a new built-in test asserts the ordering. Hover - Queued-message rows take the shared pointer treatment (raised ground, weight step, reserved marker gutter) through a hit test shared with paint. - File rows gain a weight step; approval options gain the reserved `>` marker on the first row. Selection still outranks hover everywhere. Docs: FORGE-DESIGN SS5, SS7.5, SS7.5.1, SS8.6 and SS9.4 updated to match. Tests: forge-tui (1261 lib + integration) and forge-config suites pass; fmt and clippy clean. Verified in a real PTY at 80x18, 120x40, 160x50, including file/tab/chip hover and the composer-gap collapse.
mohitranka
added a commit
that referenced
this pull request
Sep 12, 2026
Follow-up to #657 (round 2), driven by a fresh PTY review of the merged build. Spacing - Distinct tool/activity groups are separated by one blank row in airy density; rows inside one group stay tight. Compact density unchanged. - Source viewer and diff pane render one blank row between the pane title and the content when the pane is tall enough, so the header reads as chrome rather than the first file/patch line. - Session rows take a weight step on hover, matching file rows. Overlay mouse support (round 2's deferred item) - Overlay list rows record screen rects during paint (`OverlayWidget::row_sink`, `render_theme_dock`), so pointer hit-testing and the renderer share one geometry. - Single click selects a row (and the focused column for the unified provider/model/effort picker); double-click confirms through the same `Enter` path the keyboard uses, so side effects stay in one place. - Hover takes the shared treatment (surface_hover ground + weight step); selection keeps its stronger ground and `>` marker, and hover never moves the selection or pane focus. - Coverage: unified picker (providers/models/effort), resume picker, session switcher, theme dock (hover re-previews, click selects, double-click applies). Slash palette stays keyboard-only by design. Docs: FORGE-DESIGN SS7.5.1/SS8.6/SS9.4/SS9.7/SS9.8 updated. Tests: forge-tui 1264 lib + integration pass; fmt and clippy clean. PTY verified: hovered picker row #303030 bold, click moves selection, double click applies the model; source/diff title spacer visible. Co-authored-by: t <t@t>
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.
Summary
Round 2 of the UI spacing work, following up #654 (airy pass) and #656 (emphasis hues). Prototyped and verified in a real tmux PTY against OpenCode and Codex before implementation; mockups, rationale and a file-level plan live in
docs/ui-spacing-review/round-2/(docs are gitignored — local artifacts).Spacing
PANE_PAD_X 2 → 3,PANE_GAP_X 1 → 2,CHROME_GAP_Y 1 → 2: pane text starts four cells in (border + padding), panes and chrome rows no longer touch.COMPOSER_GAP_Y(2) for the transcript↔composer gutter; collapses to 1 belowAIRY_MIN_ROWS, so 80×18 keeps its rows.You/Answerspeaker labels.TURN_GAP_H,REQUEST_GAP_H,COMPOSER_PAD_Y,TRANSCRIPT_MAX_W; live metrics pinned in the metric test.Colour hierarchy
surface_hoverwas stronger thanselectionin dark (and weaker in light), inverting the intended focus > selection > hover ordering.#2E2E2E → #303030, selection#292929 → #373737#D4D4D4 → #D0D0D0, selection#E2E2E2 → #C8C8C8tagonselection≥ 4.5:1); a new built-in test asserts the ordering in both themes.Hover coverage
›gutter, via a hit test shared between paint and pointer routing.›marker on the first row.Docs
FORGE-DESIGN.md§5, §7.5, §7.5.1, §8.6, §9.4 updated.Validation
cargo test --package forge-tui --locked— 1261 lib tests + integration passcargo test --package forge-config --locked— 100 passcargo fmt --all -- --check,cargo clippy --workspace --all-targets --locked -- -D warnings— cleanNo behaviour, keybinding, persistence or JSON changes.