fix(claude-tmux): navigate modals with arrow keys so "Allow all edits" isn't downgraded to "Yes" - #37
Merged
Conversation
…" isn't downgraded to "Yes"
Claude's REPL modal is rendered by Ink's select-input, which navigates
with arrow keys and confirms with Enter — digit keypresses are silently
dropped. The previous dismissal path sent the choice digit + Enter, so
clicking option 2 ("Yes, allow all edits during this session") ended up
confirming the default cursor on option 1 ("Yes"), making claude
re-prompt on the next edit.
The scraper now records the cursor index alongside the choices, and
dismissTmuxPrompt arrow-keys from that index to the target choice's
index before sending Enter. This also fixes selection modals (model
picker, /login) where the cursor opens on the current value rather than
option 1.
- thread cursorIndex through the scraper → registerTmuxPrompt →
TmuxPromptRequest → server route → dismissTmuxPrompt
- include cursor position in the scrape fingerprint so a mid-modal
arrow re-registers with the new starting position
- add explicit stillCurrent() re-gate before the final Enter
- map target index via choices.findIndex(c => c.key === key) so leading-
zero or non-digit keys can never silently mis-navigate
- new scraper tests cover non-first cursor (model-picker shape) and
fingerprint-changes-with-cursor
alamops
added a commit
that referenced
this pull request
Jun 29, 2026
…" isn't downgraded to "Yes" (#37)
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.
Claude's REPL modal is rendered by Ink's select-input, which navigates with arrow keys and confirms with Enter — digit keypresses are silently dropped. The previous dismissal path sent the choice digit + Enter, so clicking option 2 ("Yes, allow all edits during this session") ended up confirming the default cursor on option 1 ("Yes"), making claude re-prompt on the next edit.
The scraper now records the cursor index alongside the choices, and dismissTmuxPrompt arrow-keys from that index to the target choice's index before sending Enter. This also fixes selection modals (model picker, /login) where the cursor opens on the current value rather than option 1.