Skip to content

feat(tui): require double Ctrl+C to quit, preventing accidental exits (#2358)#2497

Open
nianyi778 wants to merge 2 commits into
esengine:v1from
nianyi778:feat/tui-double-ctrlc-quit
Open

feat(tui): require double Ctrl+C to quit, preventing accidental exits (#2358)#2497
nianyi778 wants to merge 2 commits into
esengine:v1from
nianyi778:feat/tui-double-ctrlc-quit

Conversation

@nianyi778
Copy link
Copy Markdown

Summary

  • Single idle Ctrl+C no longer exits immediately — it arms a quit intent and prints a localized hint
  • A second Ctrl+C within 1.5s confirms and calls quitProcess(); a press outside the window re-arms
  • Ctrl+C during an active model turn continues to abort the turn as before (unchanged)

Changes

  • turn-interrupt.ts — add quit-armed outcome, QUIT_ARM_WINDOW_MS=1500, quitArmedAt ref in controller
  • turn-interrupt.test.ts — updated existing test + 2 new cases (arm→confirm, arm→expire→rearm)
  • App.tsx — pass quitArmedAt ref; show hint on quit-armed outcome
  • i18n types/EN/zh-CN/JA/de — add app.quitArmed in all four locales

Testing

5 turn-interrupt tests pass. Full suite (4042+ tests) passes locally.

Closes #2358

nianyi778 added 2 commits June 1, 2026 10:26
Single idle Ctrl+C now arms a quit-intent and returns "quit-armed"
instead of immediately exiting. A second Ctrl+C within QUIT_ARM_WINDOW_MS
(1500ms) calls quitProcess(); a press outside the window re-arms.

Ctrl+C during an active model turn continues to abort as before.
…N/JA/de)

Pass quitArmedAt ref to handleTurnInterrupt; show localized hint via
log.pushInfo when outcome is "quit-armed". Adds app.quitArmed key in
all four active locales.
@github-actions github-actions Bot added the v1 Legacy TypeScript line (0.x) — v1 branch, maintenance only label Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1 Legacy TypeScript line (0.x) — v1 branch, maintenance only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant