Skip to content

feat: confirm before exiting CCManager - #334

Merged
kbwo merged 1 commit into
mainfrom
feature/add-exit-confirm
Sep 8, 2026
Merged

kbwo merged 1 commit into
mainfrom
feature/add-exit-confirm

Conversation

@kbwo

@kbwo kbwo commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Exiting CCManager from the menu or the multi-project list terminated every active session immediately, with no way to back out of an accidental keypress.
  • Add a confirmation dialog before exit, defaulting focus to "Cancel", that also reports how many sessions would be terminated.
  • Confirming still exits and terminates sessions as before; canceling returns to the screen the exit was triggered from. Sessions terminated this way remain restorable on the next launch, unchanged from existing behavior.

Problem

Both exit entry points — the single-project menu's "Exit" action (q/x or selecting the row) and the multi-project list's "Exit" row — called globalSessionOrchestrator.destroyAllSessions() and exit() directly. A stray keypress or a wrong selection immediately killed every running session with no confirmation step, unlike other destructive actions in the app (e.g. deleting a worktree), which already prompt first.

Verification

Prerequisites:

  • None beyond the existing dev setup (bun install).

Steps:

  • bun run lint
  • bun run typecheck
  • bun run test (full suite, run twice to check for flakiness) — all pass
  • New tests in src/components/App.test.tsx cover: canceling returns to the menu without destroying sessions, confirming destroys sessions and exits, and the same confirm flow from the multi-project list

Exiting from the menu or the multi-project list used to terminate every
active session immediately with no way back. Add a confirmation dialog
(defaulting to Cancel) that also reports how many sessions would be
terminated, since they can still be restored on the next launch.
@kbwo
kbwo marked this pull request as ready for review September 8, 2026 13:58
@kbwo
kbwo merged commit 137330e into main Sep 8, 2026
1 check passed
@kbwo
kbwo deleted the feature/add-exit-confirm branch September 8, 2026 13:58
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.

1 participant