Skip to content

fix(tui): Escape is a no-op at root; Ctrl+Q is the only quit key - #1765

Merged
Aaronontheweb merged 2 commits into
devfrom
fix/1764-escape-cancel-key
Aug 5, 2026
Merged

fix(tui): Escape is a no-op at root; Ctrl+Q is the only quit key#1765
Aaronontheweb merged 2 commits into
devfrom
fix/1764-escape-cancel-key

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Fixes #1764.

Problem: Escape called Shutdown() / RequestQuit() at the root of seven TUI pages, so one stray Escape tap killed the app. PR #1760 established the convention for the chat page: Escape is a pure cancel key, Ctrl+Q is the only quit.

Offenders fixed:

  1. SessionsViewModel.HandleKey — session picker root (first screen)
  2. StatsViewModel.HandleKeyPress — plain Q, Escape, and Ctrl+C all quit; now only Ctrl+Q
  3. ConfigDashboardPage.HandleKeyPress — dashboard root
  4. InitWizardPage.HandleKeyPress — wizard root (GoBack() false → quit removed)
  5. ProviderManagerViewModel.GoBack — standalone netclaw provider root
  6. ModelManagerViewModel.GoBack — standalone netclaw model root (same pattern, missed by the issue)
  7. ReminderCreateViewModel.GoBackTitle and Done states (same pattern, missed by the issue)

Footers updated so the UI stops advertising Escape (or plain Q) as a quit key:

  • ConfigDashboardPage — removed [Esc] Quit
  • InitWizardPage — root no longer shows [Esc] Quit; non-root keeps [Esc] Back
  • ModelManagerPage / ProviderManagerPage — standalone footer no longer shows [Esc] Quit
  • StatsViewModel[Q] Quit[Ctrl+Q] Quit
  • ReminderCreatePageTitle/Done no longer show [Esc] Quit

Tests: 3 new page-level regression tests (sessions picker, init wizard, provider manager) prove Escape no longer kills the app and subsequent keys still work. Full TUI suite (714 tests) green. Slopwatch clean, headers verified.

Fixes #1764. Escape used to call Shutdown() or RequestQuit() at the
root of seven TUI pages, so one stray tap killed the app. It is now a
no-op at every root; Ctrl+Q is the only quit path.

Pages fixed: session picker, stats, config dashboard, init wizard,
provider manager, model manager, and reminder create. Plain Q no longer
quits stats (Ctrl+Q only). Footers updated to stop advertising Esc as a
quit key and StatsViewModel no longer advertises [Q] Quit.
Native Smoke (Linux) failed because sessions-tui.tape pressed Escape
to quit the sessions picker — exactly the behavior #1764 removes.
Switch the tape to Ctrl+Q, the only quit key.

Screenshot Regression failed because the standalone provider manager
footer no longer advertises [Esc] Quit; refresh the approved baseline.
@Aaronontheweb Aaronontheweb added the tui Terminal UI (Termina) issues label Aug 5, 2026

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed escape key and standardized all netclaw TUIs on Control + Q to quit. Control + C will also still work of course.

@Aaronontheweb
Aaronontheweb merged commit 4d1ae0f into dev Aug 5, 2026
21 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/1764-escape-cancel-key branch August 5, 2026 18:32
@Aaronontheweb Aaronontheweb mentioned this pull request Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tui Terminal UI (Termina) issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Escape quits the app in five TUI pages — standardize on Ctrl+Q to quit

1 participant