Skip to content

fix(tui): esc back-navigation; multi-select Enter stops force-selecting#264

Open
initializ-mk wants to merge 1 commit into
mainfrom
feat/tui-nav-select
Open

fix(tui): esc back-navigation; multi-select Enter stops force-selecting#264
initializ-mk wants to merge 1 commit into
mainfrom
feat/tui-nav-select

Conversation

@initializ-mk

Copy link
Copy Markdown
Contributor

Two forge init wizard UX fixes from TUI feedback.

1. Back-navigation everywhere (esc)

Previously only a few steps (review / fallback / egress) emitted a backspace-back; most screens had no way to go back. Now esc goes back one step from any step, handled at the wizard level so it works regardless of a step's sub-phase or text inputs (esc is never an editing key, so intercepting it there is safe).

  • esc → previous step (re-initialized).
  • esc on the first step → cancel (nowhere to go back).
  • ctrl+c → cancel (unchanged).
  • Key hints updated from esc quitesc back.

2. Multi-select Enter stops force-selecting the highlighted row

The multi-select confirmed on Enter by auto-checking the cursor row when nothing was toggled — so "just press Enter" silently selected whatever was highlighted, even though Space is the toggle key. Now Enter confirms exactly what Space toggled, including an empty selection. Steps like Skills / Fallback legitimately allow selecting nothing.

Tests

  • wizard_nav_test.goesc steps back from step 2→1→0, and cancels on the first step.
  • multi_select_test.goEnter confirms empty; Space+Enter selects the cursor row; cursor-move then Space toggles the correct row.

Build + golangci-lint clean; forge-cli/internal/tui/... tests green.

Companion to #263 (drop builtin-tool selection screen; web search gets its own step) — same wizard, independent changes.

…rce-selecting

Two init-wizard UX fixes:

- Back navigation: esc now goes back one step from ANY step (handled at the wizard level so it works regardless of a step's sub-phase or text inputs — esc is never an editing key). ctrl+c cancels; esc on the first step cancels since there is nowhere to go back. Previously only a few steps emitted a backspace-back, so most screens had no way back. Key hints updated to 'esc back'.

- Multi-select Enter: pressing Enter with nothing toggled now confirms an EMPTY selection instead of silently auto-checking the highlighted row. The cursor is just the highlight; Space toggles. Steps like Skills / Fallback legitimately allow selecting nothing.

Tests: wizard esc-back (and first-step cancel); multi-select enter-confirms-empty, space+enter, and cursor-move+space.
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