fix(tui3): Enter key submits standing prompt card (#1506) - #1531
Open
santoshkumarradha wants to merge 3 commits into
Open
santoshkumarradha wants to merge 3 commits into
santoshkumarradha wants to merge 3 commits into
Conversation
#1506) The standing card's box is its correction lane, and the InputText give-up read that as the whole question: enter over an empty box did nothing even with the pointer standing on an answer, and the key table's own reading offered enter only where the asker recommended something. Both give-ups now yield to a pointer that stands on an option on a question that has a pick to take — a choice or a judgement — while a connect key offer keeps its own law: one answer, the way out, taken by a digit, and enter means the words. The walk was already there; enter just never followed it.
Assisted-by: CodeAF (gemini-3.8-flash-high) Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
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.
Summary
Fixes #1506: Enter key does not submit the standing prompt card when the pointer is positioned on an option and the box has no typed text.
Root Cause
The standing card uses
Input.Kind = InputTextfor its typed correction lane. Two gates in the TUI input handling read that as the entire question:internal/tui3/question.go,questionEntergave up early onInputTextand returned(nil, false)even when the cursor stood on an answer.internal/tui3/questionkeys.go,questionOffers(needPick)offeredenter take itforInputTextonly when the asker recommended something (Pick != nil).Fix
AskChoice/AskJudgement).Verification
internal/tui3/standingenter_test.gowith 5 tests:internal/tui3package run: passes with zero regressions (only pre-existing credit warnings from cleandev).—
Drafted with CodeAF · reviewed and owned by the author