Repository navigation
Every "are you sure?" dialog confirms with Ctrl+Enter, gives each choice its own key, and ignores Enter #524
Copy link
Copy link
Closed
Labels
a-team:devClaimed by the a-team DevClaimed by the a-team Dev
Description
Context
Every "are you sure?" dialog lets Enter press whichever button has focus, so Tab-Enter or a mouse click followed by Enter can discard work, and every choice looks the same. This moves all seven confirms onto the library's ConfirmDialog, following the style guide's revised Dialog buttons rule: Ctrl+Enter presses the main action, every other choice has its own letter, Esc cancels, Enter does nothing. Pitch: #483.
mentaldesk/tui-style-guide#44 (an app without AppShell can run a ConfirmDialog) has shipped, and main already has MentalDesk.Tui 0.3.9 (#571), so no bump is needed here. #484's button schemes have already landed (#506).
Acceptance criteria
For each dialog below: open it, then check its buttons and keys match the row.
| Dialog | How to open it | Buttons, left to right |
|---|---|---|
| Unsaved changes | edit a file, close its tab | Ctrl+Enter Save (Primary) · D Don't save (Danger) · Esc Cancel |
| Unsaved changes | edit a file, quit or open another folder | Ctrl+Enter Save all (Primary) · D Don't save (Danger) · Esc Cancel |
| File changed on disk | change an open file outside TuiCode, then save it | Ctrl+Enter Compare (Primary) · O Overwrite (Danger) · R Reload (Danger) · Esc Cancel |
| Reload from disk | edit a file, reload it | Ctrl+Enter Reload (Danger) · Esc Cancel |
| Delete | delete a file in the explorer | Ctrl+Enter Delete (Danger) · Esc Cancel |
| Revert all changes | revert all in a diff | Ctrl+Enter Revert (Danger) · Esc Cancel |
| Shortcut in use | in Settings › Keybindings, bind a key that's already taken | Ctrl+Enter Bind/Replace (Primary) · Esc Cancel |
- Each dialog's buttons, keys and colours match its row: Primary in the accent colour, Danger in red, Cancel muted, each key shown first on its button.
- Cancel has focus when each dialog opens.
-
Ctrl+Enterpresses the main action, and each letter presses its own button without Alt, whichever button has focus. - Enter does nothing, whichever button has focus, including after Tab or a mouse click onto Don't save, Overwrite, Reload, Delete or Revert.
- Esc cancels; Left/Right and Tab move between buttons; Space presses the focused one; clicking a button presses it.
- Each choice does what it did before (saves, discards, compares, overwrites, reloads, deletes, reverts, binds).
- Works in every bundled theme, and over SSH.
Tests
- Each confirm's buttons: title, key, kind and order.
Ctrl+Enter, each letter, Esc, Space, and Enter with focus on every button, through the real key path, including the WindowsCtrl+LineFeedrewrite reachingCtrl+Enter.- The caller's outcome for each choice (save, discard, compare, overwrite, reload, delete, revert, bind, cancel).
ConfirmViewandKeybindingConflictDialogare gone, with nothing left calling them.
Out of scope
- Buttons outside confirms (Document Info, Open Folder, the review comment box, the terminal-integration picker, Settings' "Conflict" OK box).
- Delete to the Trash (Deleting a file in the explorer can't be taken back, even when git can't restore it #128). Whichever lands second updates the Delete dialog's wording.
- Making the dialog keys rebindable.
- Changing the library itself: anything
ConfirmDialoglacks goes to tui-style-guide as its own issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a-team:devClaimed by the a-team DevClaimed by the a-team Dev
Activity
a-team-app commentedon Oct 12, 2026
Held until tui-style-guide#44 is released: TuiCode can't run a
ConfirmDialoguntil then. Removeblockedonce a MentalDesk.Tui release has it.Health notes a Project that won't put new issues in Triage (#508)
a-team-app commentedon Oct 15, 2026
The hold has cleared: tui-style-guide#44 closed this morning, and MentalDesk.Tui 0.3.5 (now at 0.3.7) has it. Remove
blockedto let the Dev pick this up. The task includes bumping MentalDesk.Tui past #559's 0.3.3.a-team-app commentedon Oct 20, 2026
Draft PR #582 is up.
Confirm every "are you sure?" with Ctrl+Enter and a key per choice (#582