feat: confirmation dialog before stopping a recording - #12
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Accidental clicks mid-meeting were irreversibly ending sessions. The main Stop button (and its Cmd-. shortcut) now presents 'Are you sure you want to stop recording?' with Cancel as the default; the silence prompt, notification action, and HTTP API still stop directly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ts at boot Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… dead Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Resolve ContentView.swift conflict: the isRunning onChange keeps both main's APIServer state mirroring and the PR's stop-confirmation withdrawal when the session ends through another path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
It's too easy to stop a recording: the main Stop Recording button (and its ⌘. shortcut) tore the session down on a single click, and accidental clicks mid-meeting kept ending sessions irreversibly (transcript finalizes, post-processing starts).
Change
The main Stop button now presents a standard alert — "Are you sure you want to stop recording?" — with Cancel as the default button (Return cancels) and a destructive Stop Recording button. Capture, transcription, and the timers keep running while the dialog is up; nothing stops until the explicit confirm.
Only the main button confirms. Deliberately unchanged:
POST /sessions/stopAPI/**untouchedImplementation: a small
@ObservableStopConfirmationModelowns the confirmation lifecycle (so it's unit-testable);ControlBar's sharedonStopclosure splits intoonStopRequested(main button) andonStop(silence prompt);ContentViewhosts the.alertand withdraws it via the existingisRunningonChange if the session ends through any other path (capture error, API stop, notification stop). A stale confirm racing a stop is a no-op viastopSession()'s existing re-entrance guard.Spec and plan are included under
docs/superpowers/.Testing
confirmStop()— SwiftUI clears the alert binding before running the button action, so addingguard isPresentedwould silently break every confirm).Known limitation (documented in the spec): Esc does not cancel — SwiftUI drops the cancel-role's implicit Esc equivalent when the button also carries
.keyboardShortcut(.defaultAction), and a button holds one shortcut. We kept the verified Return-cancels-by-default behavior rather than trading it for Esc; bail-out is Return or clicking Cancel.🤖 Generated with Claude Code