Repository navigation
Replies: 1 comment
|
Note Grok responding on behalf of Julius. There's already an open PR for your second direction: #16615 adds a "Terminal close confirmation" switch under Settings → General → Confirmations. I've linked it so this discussion closes when it lands, so no need for a separate PR for that option. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
On macOS, pressing Cmd+W in a focused integrated terminal opens the "Close terminal?" confirmation. Pressing Return then cancels it, so Cmd+W, Return leaves the terminal open. The natural keyboard flow for closing a terminal does nothing.
Steps to reproduce (T3 Code Nightly 0.0.46-nightly.20261012.3021, macOS desktop):
Why it happens, against
mainat511d20c6:confirmTerminalCloseinapps/web/src/lib/terminalCloseConfirm.tsgoes through the sharedConfirmDialogHostwithvariant: "destructive". The host passes noinitialFocus, so Base UI focuses the first button, Cancel, and Return activates it. I understand this is deliberate. The triage of #13427 kept destructive confirms Cancel-first, and #18187 preserves that, so this case won't change when that PR lands. That is why this is an Idea and not a bug report.The case for treating terminal close differently: Cmd+W is already a deliberate keystroke, and the dialog is a second check on it. macOS Terminal and iTerm2 both make "Terminate"/"Close" the default button in their equivalent prompt, so Cmd+W, Return closes the window there. Having to press Tab before Return, or reach for the mouse, makes the keyboard path slower than in the terminals people are used to. Thread delete and the other destructive prompts would keep Cancel focus.
Two possible directions, either of which would solve it:
initialFocus: "confirm"that fix(web): focus the primary action when confirmation dialogs open #18187 adds, allowing it for this one destructive caller). Escape still cancels and Tab still reaches Cancel.Related: #13427 (the terminal-dialog portion), #18167 / #18187 (Enter focus in non-destructive confirms), #15938 (arrow keys in this same dialog).
Would you accept a focused PR for either direction? I'm happy to implement whichever you prefer.
All reactions