Repository navigation
Announce no saved recording when stop knows of none - #15073
Conversation
Stopping a recorder this script did not start, with no saved pid and no recording file, still finalized and posted "Screen recording saved" for an empty name: a broken "-preview.png" thumbnail and a click that opens nothing. Now that the whole script runs under one lock, that is the last way the empty-name toast from #11508 is reached. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-Authored-By: Codex Medium <[email protected]>
[Medium impact] The PR appears safe to merge. SummaryStops sending “Screen recording saved” when the saved state names no existing recording.
The previous and current commits have different merge bases with the target commit, so this review used the full PR diff. Reviews (2) · Last reviewed commit: "Merge quattro into fix/issue-11508" · Reviewed by Greptile |
|
Looks good that stop no longer pretends a recording was saved when this script never started one (#11508). One quoting nit in the new branch: elif [[ ! -f $(cat "$RECORDING_FILE" 2>/dev/null) ]]; thenIf recording_path=$(cat "$RECORDING_FILE" 2>/dev/null || true)
elif [[ -z $recording_path || ! -f "$recording_path" ]]; thenHappy to re-check after that. |
quattro moved the force-kill toast to omarchy-i18n beside where the guard sits; the guard keeps quattro's translated toast. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Brought up to date with What changed. The branch conflicted with What was checked, on a worker built from the Omarchy ISO:
On the quoting suggestion above: the guard is already safe. Inside Second opinion: Codex Medium reviewed this head and found no defects. It also reproduced the bug against This now waits on the maintainer. |
Quattro's test consolidation (omacom#16337) conflicted with this branch's tests at the end of screenrecording-test.sh; both blocks are kept, the stale-audio tests first, because this branch's block replaces the recorder-process stub they rely on. Quattro's omacom#15073 added a stop branch for a recording with no file to finalize, which relied on the indicator refresh this branch moves out of the common path. It now refreshes there too, with an assertion that a stop with no recording to finalize clears the indicator.
Stopping a recorder this script did not start, with no saved pid and no recording file, still finalized and posted "Screen recording saved" for an empty name: a broken "-preview.png" thumbnail and a click that opens nothing. Now that the whole script runs under one lock, that is the last way the empty-name toast from omacom#11508 is reached. Co-authored-by: Omarchybot <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Codex Medium <[email protected]> (cherry picked from commit 0fc420c)
Fixes #11508
#11508 reported two overlapping stops of a screen recording both posting "Screen recording saved", one of them with a broken thumbnail or with
-preview.pngas its image. Onquattrothat race is already gone. Since e1b0e5e (#14431) the whole script runs under oneflock, so a second stop waits for the first to finish and then finds nothing to stop. That commit is not in a release yet, and v4.0.4 still has the race.One way to the empty-name toast remains. With no saved pid, stop selects whatever recorder the user runs, which covers a recording started before the pid was saved, or a recorder something else started. Stopping one of those leaves no recording file. Stop still went on to finalize, built the preview path
-preview.pngfrom the empty name, and posted "Screen recording saved" with that broken image and a click action that opens nothing.Stop now skips the finalize, the preview and the toast when the state file names no existing recording. The recorder is still signalled, and the indicator, webcam and audio cleanup and the removal of the state files run as before. The existing no-saved-pid test now also asserts that no notification is posted.
The guard sits above the
elsebranch that #15038 rewrites, and the two merge cleanly.