Repository navigation
Keep Return in the agents sign-in code field from also cancelling the sign-in - #19857
Merged
Merged
Conversation
… sign-in Qt passes Return on after a TextField accepts it, so the panel's key catcher pressed the Cancel under the cursor right after the code was handed over, stopping agy before it could finish the Gemini sign-in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The field lives inside the inline AddView component, so the key catcher couldn't reach it by id: the binding threw a ReferenceError and never blocked Return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
[Low impact] The change appears safe to merge. SummaryStops the agents panel from acting on keys while the sign-in code field has focus.
Reviews (1) · Last reviewed commit: "Read the sign-in code field's focus thro..." · Reviewed by Greptile |
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.
Pasting Gemini's sign-in code into the agents panel and pressing Return handed the code to `agy acp --login` and then cancelled the sign-in in the same keystroke, so the panel stepped back to its index with no Gemini line and no error.
Qt's TextInput emits `accepted` on Return and then ignores the key event, so it bubbles up to the panel's `PanelKeyCatcher`. While a sign-in runs, the top key row is the hero's add button, which is Cancel then, and with the cursor or pointer active Return activated it: `cancelAdd()` sent SIGTERM to the add command, which killed agy before its token exchange. agy's login log ends in "Raising signal 15" right after the OAuth flow starts.
The catcher is now blocked while the paste field has focus, as other panels do for their inline editors. Return only submits, and Escape in the field still cancels through its own handler.
🤖 Generated with Claude Code