Skip to content

Keep Return in the agents sign-in code field from also cancelling the sign-in - #19857

Merged
dhh merged 2 commits into
quattrofrom
worktree-agents-paste-enter-cancels
Nov 23, 2026
Merged

dhh merged 2 commits into
quattrofrom
worktree-agents-paste-enter-cancels

Conversation

@dhh

@dhh dhh commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

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

dhh and others added 2 commits November 23, 2026 06:29
… 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>
@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The change appears safe to merge.

Summary

Stops the agents panel from acting on keys while the sign-in code field has focus.

  • Return submits the sign-in code without also cancelling sign-in.

Reviews (1) · Last reviewed commit: "Read the sign-in code field's focus thro..." · Reviewed by Greptile

@dhh
dhh merged commit 233732b into quattro Nov 23, 2026
3 checks passed
@dhh
dhh deleted the worktree-agents-paste-enter-cancels branch November 23, 2026 05:49
@emirb emirb added this to the 4.6.0 milestone Dec 1, 2026
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.

2 participants