Skip to content

fix: command input routing — single-owner keypress, Esc layer stack, exact-match ranking, safe confirm defaults#31

Merged
CKGrafico merged 11 commits into
mainfrom
feature/command-input-routing
Jul 3, 2026
Merged

fix: command input routing — single-owner keypress, Esc layer stack, exact-match ranking, safe confirm defaults#31
CKGrafico merged 11 commits into
mainfrom
feature/command-input-routing

Conversation

@CKGrafico

Copy link
Copy Markdown
Owner

Fixes four keystroke routing defects in the TUI board:

  1. Double-handling — j/k/arrows no longer move the panel list AND type into the command bar. An InputOwner type + resolveInputOwner() determines single ownership per keypress (modal > commandBar > panel). Panel useInput hooks are gated on navActive.
  2. Fuzzy Enter executes wrong command — palette ranking now puts exact/prefix matches above fuzzy subsequence matches. Typing delete focuses Delete, not Edit.
  3. Escape inconsistent per surface — all Escape handling routes through a central popLayer() that closes one layer per press, topmost first. Log modal now closes on Esc (parity with q).
  4. Stale input after Escape + unsafe confirm — Esc closing the dropdown also clears inputValue. Confirm prompts (quit/delete/stop) now focus cancel by default.

Verification: tsc passes clean, lint 87 errors (same as main), tests show only pre-existing failures. All new tests pass (board-state 11, tui-components 39).

@CKGrafico
CKGrafico merged commit 3b49b1c into main Jul 3, 2026
0 of 3 checks passed
@CKGrafico
CKGrafico deleted the feature/command-input-routing branch July 3, 2026 12:01
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