feat: escape cancel countdown with 3-second progress bar - #5
Merged
Conversation
Pressing Escape during recording now shows a "Cancelling..." overlay with a draining orange progress bar instead of immediately switching to transcribing. The user has 3 seconds to reverse the decision: - Second Escape during countdown: cancels countdown, transitions to "Transcribing...", and pastes the result as normal - Countdown expires: HUD disappears silently, transcription runs in the background, result saved to log with wasPasted = false (no paste) - Short recordings (< 0.5 s): countdown skipped, silently discarded - Transcription failures after cancel: silently discarded, no notification Log entries now carry a wasPasted flag (backward-compatible JSON decode defaults to true). Not-pasted entries show a "not pasted" annotation in the log window. New state: AppState.cancelling (recording → cancelling → processing/idle) New indicator: IndicatorState.cancelling with CABasicAnimation fill bar Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
wasPasted = false(no paste triggered)Changes
AppState.cancelling— new state with transitionsrecording→cancelling,cancelling→processing,cancelling→idleIndicatorState.cancelling— new HUD state with orange label +CABasicAnimationfill bar (sublayer-based to avoid Auto Layout conflicts)TranscriptionLogEntry.wasPasted: Bool— backward-compatible (absent JSON key →true)TranscriptionLogStore.append(wasPasted:)— new parameter with defaulttrueAppDelegate—beginCancelCountdown(),restoreFromCancelling(),commitCancelledTranscription(),silentlyResetToIdle();cancelRecording()removedLogView— "not pasted" caption annotation on cancelled entriesTest plan
swift test→ 131 tests, 0 failures🤖 Generated with Claude Code