Repository navigation
Keep failed recordings in Library for retry, not deletion - #363
Merged
Merged
Conversation
…gain When a Record session heard nothing live and the async pass then failed (offline, a 5xx, a timeout), the audio was left on disk with no entry pointing at it: dismiss the error and the recording was unreachable. Now the failure saves the recording as an entry with no text yet (SavedTranscript.needsTranscription), shown in the Library as "Recording · Not transcribed". The failure page offers Try Again and Show in Finder, and opening the entry from the Library transcribes it again, filling the same entry in rather than adding another. Untitled entries without text are skipped by the title pass. Fixes #331 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7Z9V8SZ8X1CBBS7q
…le is gone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7Z9V8SZ8X1CBBS7q
…orphan it Abandoning the async pass (Back on Transcribing…, or a file dropped over it) cancelled it before the failure branch could save anything. The entry now exists first and the pass fills it in, deletes it on no speech, or keeps it on failure. A success for an entry deleted meanwhile no longer re-adds it, and Try Again on a deleted entry does nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7Z9V8SZ8X1CBBS7q
Quitting (⌘Q, logout, a Sparkle relaunch) runs no deinit and resumes no task, so an active Record session left an unfinalized, unplayable .m4a, its live transcript was never saved, and any change in the 300 ms save debounce was lost. - AppDelegate.applicationWillTerminate calls TranscriptsModel.prepareForExit, which stops the recorder (closing the file), saves the live transcript as a recording entry, and writes the history synchronously, merging the saved file first if it hasn't been loaded yet. - History writes go through one serial queue, so an earlier detached write can no longer finish its rename after a later one and resurrect deleted entries or drop new ones. The exit flush queues behind any write in flight, so it lands last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1RyMwLTuh8iqUWfZ7i
With no output device the drain waits out its whole deadline (0.05 s of audio plus drainSlack, 2 s), so a flat 3 s bound left under a second of scheduler room and a loaded runner overshot it (3.39 s on PR #357's check job). Bound it as the sibling test does: deadline plus slack plus 2 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1RyMwLTuh8iqUWfZ7i
waitUntil (engine) and until (iPhone) polled against 5 s and 3 s wall-clock budgets. On a loaded runner the whole parallel run can stall for seconds — every engine test in one run took ~6 s — and two SelectionSpeechRouter tests lost their budget to the stall; under the address sanitizer the iPhone's watchdog-release test ran out before its .noTarget landed. Every caller expects its condition to hold, so a passing test never waits out the timeout: it only bounds a hang, and 30 s does that without the flake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7Z9V8SZ8X1CBBS7q
tapMic() lifted with micUp(), which times the finger from the wall clock. Finger down writes the press, and under the address sanitizer on a busy runner that alone outlasted the 350 ms hold threshold: the tap became a hold, its lift queued the stop, and the answer sent it, so the dictation went straight to stopping. That failed "a settled phase settles the gate only when it answers the press" on PR #357's ios-sanitizers (address) job, and a hands-free press or a status-line tap could do the same on a slow device. tapMic() now lifts at the touch's own stamp. Adds a test that jumps the model's clock past the hold threshold while the press is written: before the fix the tap sent a release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1RyMwLTuh8iqUWfZ7i
3 tasks
…ffer no Copy Carried over from #360. An untranscribed recording opens by transcribing, so its action reads Transcribe and its VoiceOver hint says so; it has no text, so Copy is left out of its menus and Edit › Copy dims (a nil onCopyCommand) — as it now also does with nothing selected, where it used to stay enabled and copy nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to invalid changes in the merge commit
Nov 25, 2026
alexkroman
enabled auto-merge
November 25, 2026 00:06
…transcribed prepareForExit (#357) left a recording with no live transcript as a file with no Library entry; with #363 every recording keeps an entry, so this one is saved untranscribed (needsTranscription) for the Library to offer again, as a failed pass's is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ging #357 Merging #357 brought the file to 401 lines and swiftlint's file_length failed check. Tightens transcribe's doc comment rather than the merged code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7Z9V8SZ8X1CBBS7q
# Conflicts: # App/Blurt/Blurt/Wizard/TranscriptsModel+Recording.swift
This was referenced Nov 25, 2026
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
… CI run Recent multi-commit PRs (#410, #413, #414, #416, #420, #422, #423, #425, #426) mostly spent their extra ~37-minute runs on things nothing caught before CI: - scripts/check-swift-lint-lite.sh: a toolchain-free text match for the opt-in SwiftLint/swift-format rules it can see (modifier_order, no_empty_block, NoBlockComments, swift-format's `catch where`). Run by check.sh (so --portable and --lint-only) and the swift-budgets edit hook; would have flagged the pre-fix files of #414, #422 and #425. - .claude/hooks/push-gate.sh: a PreToolUse hook that runs `check.sh --portable` (~20 s) before any `git push` and blocks a red one — jscpd clones (#420, #422) and post-merge size overruns (#363, #378) were pushes that skipped the documented portable run. - AGENTS.md / CLAUDE.md: a "Rules only CI catches" list for the rest (variable_shadowing, one_declaration_per_file, type_contents_order, multiline_function_chains, MemberImportVisibility, one argument per line), and the new hook and script in the hooks table and permissions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1UDUZXyuF6g7GUmmNu
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.
What & why
When a recording's live transcript is empty or its async transcription fails, the app now saves it to the Library with no transcript yet (
needsTranscription), rather than deleting the file. This preserves the audio so users can:The change adds a
retryfield to the.failedstate to pass theSavedTranscriptentry to the UI, enabling the retry flow. New methodskeepUntranscribed(),retranscribe(), andfillIn()manage the lifecycle: save with empty text → transcribe → fill in the result or delete if no speech found.How it was tested
Added unit test
needsTranscriptionRule()covering the newneedsTranscriptionpropertyExisting tests pass; no test changes needed for the state machine logic (covered by integration)
scripts/check.shpassesscripts/check.shpasses (or CI will, if I'm not on a Mac)I read AGENTS.md and this doesn't reintroduce anything deliberately removed
Docs updated if behavior changed (comments updated to reflect new save-then-retry flow)