feat(tui): two-pane focus navigation and mouse on select screen#137
Merged
Conversation
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
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 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:
WithMouseCellMotion).Visual style is unchanged — interaction only.
Testing
go vet ./...passesselectHitTestclick→row mapping, mouse click/wheel handling, and a focus-render assertion (TestSelectFocusIsVisuallyIndicated, which forces a colour profile since lipgloss strips colour without a TTY)TestE2E_InstallWizard_MouseTogglesPackagedrives a real terminal, sends an SGR mouse-click escape sequence, and asserts the toggle — ran green locally alongside the existing keyboard choreographyCross-repo checklist
openboot.dev? — NoNotes for reviewer
selectHitTest(click coordinate → row) is a pure function whose geometry mirrors the renderer, so the mapping is unit-tested rather than eyeballed.go.mod:termenvmoves from indirect to a direct dep (used by the colour-profile test).https://claude.ai/code/session_01HLoiSd2k9EJJ1HPjjDgUgo