Skip to content

feat(tui): round 3 spacing polish and overlay mouse support - #658

Merged
mohitranka merged 1 commit into
mainfrom
feat/tui-round3-overlay-mouse
Sep 12, 2026
Merged

mohitranka merged 1 commit into
mainfrom
feat/tui-round3-overlay-mouse

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

Round 3 of the UI work, following #657. Fresh PTY review of the merged build found three gaps; this PR fixes them. Local study artifacts: docs/ui-spacing-review/round-3/ (gitignored).

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 gain a weight step on hover (ground already existed).

Overlay mouse support (round 2's deferred item)

  • Every picker list row records its screen rect 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. Hover never moves the selection and never moves pane focus.
  • Coverage: unified provider/model/effort picker, resume picker, session switcher, theme dock (hover re-previews, click selects, double-click applies). Slash palette rows stay keyboard-only by design.

Docs

FORGE-DESIGN.md §7.5.1, §8.6, §9.4, §9.7, §9.8 updated.

Validation

  • cargo test --package forge-tui --locked — 1264 lib tests + integration pass
  • cargo fmt --all -- --check, cargo clippy --workspace --all-targets --locked -- -D warnings — clean
  • PTY: hovered model row renders #303030 bold; single click moves selection and window; double-click applies the model (footer chip changed to OpenCode/glm-5.1); source/diff title spacer visible at 140×42

No keybinding, persistence or JSON changes.

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.
@mohitranka
mohitranka merged commit 8ee224f into main Sep 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant