Skip to content

feat(tui): two-pane focus navigation and mouse on select screen#137

Merged
fullstackjam merged 1 commit into
mainfrom
feat/select-two-pane-mouse
Jul 9, 2026
Merged

feat(tui): two-pane focus navigation and mouse on select screen#137
fullstackjam merged 1 commit into
mainfrom
feat/select-two-pane-mouse

Conversation

@fullstackjam

Copy link
Copy Markdown
Member

What does this PR do?

Reworks the install wizard's SELECT screen from "← → cycles categories, ↑ ↓ always drives the list" into an explicit two-pane focus model, and adds mouse support.

Why?

The screen paired a category sidebar with a package list but had one confusing input model — two columns, yet ← → cycled categories while ↑ ↓ only ever moved the list. Now:

  • ← → (and tab) move focus between the sidebar and the list; the active pane's cursor is bright, the other dimmed.
  • ↑ ↓ act on the focused pane — change category (list live-previews) under sidebar focus, move the package cursor under list focus.
  • Mouse: left-click a category to switch to it, left-click a package to toggle it, wheel to scroll the list (via WithMouseCellMotion).

Visual style is unchanged — interaction only.

Testing

  • go vet ./... passes
  • Relevant tests added/updated — unit tests for the focus model, the pure selectHitTest click→row mapping, mouse click/wheel handling, and a focus-render assertion (TestSelectFocusIsVisuallyIndicated, which forces a colour profile since lipgloss strips colour without a TTY)
  • New L3 pty test TestE2E_InstallWizard_MouseTogglesPackage drives a real terminal, sends an SGR mouse-click escape sequence, and asserts the toggle — ran green locally alongside the existing keyboard choreography
  • Tested locally by driving the wizard on a tmux pty (isolated HOME, quit before confirm — nothing installed): ← → focus, ↑ ↓ per-pane, mouse category click, and select-all all verified

Cross-repo checklist

  • Does this need a docs/content update in openboot.dev? — No
  • Does this change the CLI ↔ server API contract? — No

Notes for reviewer

  • selectHitTest (click coordinate → row) is a pure function whose geometry mirrors the renderer, so the mapping is unit-tested rather than eyeballed.
  • Known follow-up (deliberately out of scope): the focus indicator is colour-only, so it's invisible without colour (piped / colourblind). A structural cue (dim/hidden cursor on the unfocused pane) would fix that — flagged, not done here.
  • go.mod: termenv moves from indirect to a direct dep (used by the colour-profile test).

https://claude.ai/code/session_01HLoiSd2k9EJJ1HPjjDgUgo

The select screen paired a category sidebar with a package list, but ← →
just cycled categories while ↑ ↓ always drove the list — two columns, one
confusing model. Rework it into an explicit two-pane focus model:

- ← → (and tab) move focus between the sidebar and the list; the active
  pane's cursor is bright, the other dimmed, so "which column am I in"
  reads at a glance.
- ↑ ↓ act on the focused pane: change category (list live-previews) when
  the sidebar has focus, move the package cursor otherwise.
- Mouse: left-click a category to switch to it, left-click a package to
  toggle it, wheel to scroll the list (enabled via WithMouseCellMotion).

Click→row mapping is a pure, unit-tested function (selectHitTest) whose
geometry mirrors the renderer, so it's verified rather than eyeballed.
Visual style is unchanged — interaction only.

Claude-Session: https://claude.ai/code/session_01HLoiSd2k9EJJ1HPjjDgUgo
@github-actions github-actions Bot added tests Tests only ui Terminal UI labels Jul 9, 2026
@fullstackjam fullstackjam merged commit 49130f5 into main Jul 9, 2026
14 checks passed
@fullstackjam fullstackjam deleted the feat/select-two-pane-mouse branch July 9, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests only ui Terminal UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant