Skip to content

Every "are you sure?" dialog confirms with Ctrl+Enter, gives each choice its own key, and ignores Enter #524

Closed

Description

@a-team-app

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+Enter presses 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 Windows Ctrl+LineFeed rewrite reaching Ctrl+Enter.
  • The caller's outcome for each choice (save, discard, compare, overwrite, reload, delete, revert, bind, cancel).
  • ConfirmView and KeybindingConflictDialog are 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 ConfirmDialog lacks goes to tui-style-guide as its own issue.

Activity

  1. a-team-app commented on Oct 12, 2026

    @a-team-app
    ContributorAuthor

    Held until tui-style-guide#44 is released: TuiCode can't run a ConfirmDialog until then. Remove blocked once a MentalDesk.Tui release has it.

  2. a-team-app commented on Oct 15, 2026

    @a-team-app
    ContributorAuthor

    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 blocked to let the Dev pick this up. The task includes bumping MentalDesk.Tui past #559's 0.3.3.

  3. added
    a-team:devClaimed by the a-team Dev
    and removed
    blockedWaiting on another issue
    on Oct 20, 2026
  4. a-team-app commented on Oct 20, 2026

    @a-team-app
    ContributorAuthor

    Draft PR #582 is up.

  5. added a commit that references this issue on Oct 20, 2026
    52e6eac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-team:devClaimed by the a-team Dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions