feat(tui): multi-select confirm button + space/enter to toggle#507
Open
gewenyu99 wants to merge 3 commits into
Open
feat(tui): multi-select confirm button + space/enter to toggle#507gewenyu99 wants to merge 3 commits into
gewenyu99 wants to merge 3 commits into
Conversation
Multi-select menus previously used space to toggle and enter to submit, which repeatedly confused users who expected enter to act on the focused item. Replace that split with a single, predictable interaction model shared by both multi-select primitives: - space OR enter toggles the focused option (both keys do the same thing) - a new focusable ConfirmButton renders just past the last option; arrow navigation walks onto it (top/bottom wrap onto the button) - pressing space/enter on the button submits the current selection This removes the old "enter anywhere submits" behavior (including the implicit "auto-pick the hovered item when nothing is selected" magic). Adds the ConfirmButton primitive, applies the pattern in PickerMenu mode="multi" and GroupedPickerMenu, accounts for the button's height in the grouped menu's scroll budget, updates the playground demos and the ink-tui PRIMITIVES skill doc. Generated-By: PostHog Code Task-Id: 23c3cdf8-4173-4407-be82-6f2e5078b3c9
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
Collaborator
Author
|
To be honest, I like the original controls the best if we just retained the control hints 🤷 These are always confusing and many more arrow clicks :P Alternative style i tried. Screen.Recording.2026-06-04.at.9.00.40.PM.mov |
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.
Problem
In the wizard's multi-select forms, Space toggled an option but Enter submitted the whole screen. People (including the team) repeatedly got tripped up by this — they'd hit Enter expecting it to act on the focused item and instead jump to the next screen. The ask was to move to a single, Claude-Code-style pattern: Enter/Space both act on the focused row, and there's an explicit "Confirm" button you navigate to and press Enter on to proceed.
Changes
Introduces one shared interaction model for all multi-select surfaces:
ConfirmButtonprimitive (the "physical button") renders just past the last option. Arrow navigation walks the cursor onto it (top/bottom wrap onto the button).Applied to both multi-select primitives:
PickerMenu(mode="multi")GroupedPickerMenu(also accounts for the button's height in its scroll budget)Also: adds the
ConfirmButtonbarrel export, a static showcase in the Layout playground demo, updated KeyboardHints demo hint labels, and documents the pattern in theink-tuiPRIMITIVES skill reference. Single-select (PickerMenudefault) is unchanged — Enter already selects there.Screen.Recording.2026-06-04.at.9.06.02.PM.mov
Test plan
pnpm build && pnpm test && pnpm lint— build clean, 728/728 unit tests pass (one pre-existing flaky CLI-timeout test passes in isolation), 0 lint errors.pnpm try --playground→ Input and KeyHints tabs exercise the multi-select + grouped flows; Layout tab shows the ConfirmButton focused/unfocused states.Created with PostHog Code