macOS: a Studio recording that fails to start stays "Recording in progress"
Description
On macOS, when a Studio recording fails to start after Cap has begun writing it, the main window shows the error, but the recording is left with the status InProgress. Nothing changes it after that:
- Settings → Recordings lists it with a blue "Recording in progress" badge, even after Cap is restarted and nothing is recording.
- While that page is open, it rescans the whole recordings library every 2 seconds, because it treats a row in progress as a live recording.
Windows and Linux already mark a start like this Failed with its error (persist_failed_recording in ActorBuilder::build in studio_recording.rs), so the row gets a red "Recording failed" badge with the reason. The macOS branch of build only returns the error.
With crash-recovery recording on, the default, the metadata is written before the first segment is set up, so this covers any error from screen capture, camera, microphone or encoder setup.
Reproduction
- On macOS, start a Studio recording that fails while capture is being set up. A debug build can force this with
CAP_GPUI_FAIL=cap-recording::macos::ScreenCaptureActor::new, from #3947. - Dismiss the error and open Settings → Recordings, or restart Cap first.
Reproduced on macOS 15.7.3 with a debug build of main (1016fe6cd) plus #3947's switch. The row showed "Recording in progress", recording-meta.json still said InProgress after a restart, and the open page logged a library scan every ~2.1 s.
Expected
The recording is marked as failed with its error, as on Windows and Linux.