Skip to content

Pick dialog buttons with a bare letter - #154

Merged
dhh merged 3 commits into
masterfrom
bare-letter-dialog-buttons
Nov 12, 2026
Merged

dhh merged 3 commits into
masterfrom
bare-letter-dialog-buttons

Conversation

@omarchybot

@omarchybot omarchybot commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

The unsaved-changes prompt needed Alt+C, Alt+D or Alt+S to pick a button. Alt is the convention for dialogs with a text field, where a bare letter would type, but this prompt has nothing to type into, so a bare C, D or S is enough, as omacom/plain#10 made it in Plain. Alt with the letter still works and Escape still cancels. The keys follow the translation's access keys, as before.

The letter reaches the prompt, not the text behind it: the prompt takes focus when it opens, and it only ever opens because the writer closed the window or chose a file to open, so the next key they press is meant for it.

The external-change prompt is left without letter keys. It has no access keys to extend, it comes up on its own while the writer is typing, and Reload throws their changes away, so the next letter typed must never pick a button there, and a test now holds it to that. The shortcuts overlay is left alone too: its single Close button has no access key, and Enter and Escape already close it.

Turkish Cancel ("&İptal") bound no key at all, with or without Alt, because Qt reads İ as an unknown key. It is "İ&ptal" now, and the catalog check refuses an access key Qt cannot bind.

🤖 Generated by Opus 5.5 in Claude Code. Reviewed by Codex XHigh.

omarchybot and others added 2 commits November 12, 2026 15:06
The prompt has nothing to type into, so C, D and S are enough, as in omacom/plain#10; Alt with the letter still works and Escape still cancels. The external-change prompt keeps no letter keys: it comes up on its own while the writer types, and Reload throws their changes away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QKeySequence reads "İ" as Qt::Key_unknown, so "&İptal" bound no key at all, with or without Alt. P is free among the Turkish keys. The catalog check now refuses an access key Qt cannot bind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex <noreply@openai.com>
@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR lets users choose unsaved-changes buttons with their translated letter keys, with or without Alt.

  • The unsaved-changes prompt accepts button letters with or without Alt.
  • Turkish Cancel uses P as its access key.

Reviews (2) · Last reviewed commit: "Leave no recovery draft behind when the ..." · Reviewed by Greptile

unsavedChangesDialogTakesTheLetterFromTheEditor types "draft" into the real editor, and Backend keeps that as a crash-recovery draft in the test-mode data folder, which the next run's editor restores. The test only clears it by choosing Discard at the end, so a run that failed before then, as it does on the old dialog, left "draft" behind and made every later run start with it and fail, change or no change. It now discards the draft however it ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh merged commit 1faf863 into master Nov 12, 2026
2 checks passed
@dhh
dhh deleted the bare-letter-dialog-buttons branch November 12, 2026 15:08
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