Repository navigation
Keep failed recordings in Library, retry transcription - #360
alexkroman wants to merge 2 commits into
Conversation
When a recording ended with nothing heard live and the async pass then failed (offline, a 5xx, a timeout), the file stayed on disk but nothing pointed at it: no Library entry, no retry, so once the error was dismissed the recording was unreachable from Blurt. Now the failure saves the recording as an untranscribed entry (SavedTranscript.isUntranscribed: a recording with no text). The Library lists it as "Recording · Not transcribed", and opening it (or its Transcribe action) runs the async pass again, filling in the same entry and titling it on success. The failure page says the recording is kept and offers Try Again and Show in Finder. Untranscribed entries are skipped by the title backfill and have no Copy. The transcribing section moves to TranscriptsModel+Files.swift to keep TranscriptsModel.swift under the file-length budget. Fixes #331 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1UyQGFGh3VornAuvjw
- VoiceOver now announces that the recording was saved, not just the error, and an untranscribed Library row's hint says it transcribes. - The error and the saved-in-Library note share one Label, so they align under the icon and read as one message. - Clearer wording: "The recording is saved in your Library. You can transcribe it now or later." - The inline Show in Finder is disabled once the file is gone, as the toolbar's is, and has a tooltip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1UyQGFGh3VornAuvjw
|
A re-run would hit the same limit. #355 raises the timeout to 45 minutes, so this PR should go green once that lands and CI runs again. Generated by Claude Code |
|
Closing as a duplicate of #363 (both keep a failed recording in the Library for retry). #363 saves the untranscribed entry before the async pass starts, so the recording keeps an entry however the pass ends — including Back mid-pass, where this PR's cancelled task returns before |
Pull request was closed
…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>
What & why
When a recording's async transcription pass fails (network error, timeout, etc.), the audio file is now kept in the Library as an untranscribed entry rather than being deleted or orphaned. This preserves the user's audio and lets them retry transcription later when the network is back.
The changes:
Untranscribed state: Added
SavedTranscript.isUntranscribedto identify recordings with no transcript text. These entries keep the audio reachable from the Library.Failure handling: When transcription fails, a recording is saved as untranscribed (via
keepUntranscribed) instead of being lost. The failure state now carries the entry ID so the UI can offer retry and file access.Retry flow: Added
transcribe(_: SavedTranscript)andretryRecording(_:)to retry untranscribed recordings. Opening an untranscribed entry in the Library triggers transcription.UI updates:
Refactoring: Moved the full
transcribeimplementation and helpers (keepUntranscribed,removeEntry) toTranscriptsModel+Files.swiftto split concerns and manage file length.Fixes the scenario where a user loses audio due to a transient network failure during transcription.
How it was tested
scripts/check.shpasses (or CI will, if I'm not on a Mac)Added unit test
untranscribed()inHistoryModelTeststo verify theisUntranscribedproperty correctly identifies recordings with empty/whitespace-only text.