Skip to content

Announce no saved recording when stop knows of none - #15073

Merged
omarchybot merged 2 commits into
quattrofrom
fix/issue-11508
Oct 31, 2026
Merged

omarchybot merged 2 commits into
quattrofrom
fix/issue-11508

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

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.png as its image. On quattro that race is already gone. Since e1b0e5e (#14431) the whole script runs under one flock, 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.png from 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 else branch that #15038 rewrites, and the two merge cleanly.

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]>
@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Stops sending “Screen recording saved” when the saved state names no existing recording.

  • Stopping a recorder without a saved video no longer shows a save toast.

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

@jandrusk

Copy link
Copy Markdown

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) ]]; then

If RECORDING_FILE is empty or the path has spaces, [[ -f … ]] gets the wrong operands. Safer:

recording_path=$(cat "$RECORDING_FILE" 2>/dev/null || true)
elif [[ -z $recording_path || ! -f "$recording_path" ]]; then

Happy to re-check after that.

@omarchybot omarchybot added the bug Something isn't working label Oct 17, 2026
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]>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator Author

Brought up to date with quattro and verified at 39ec188.

What changed. The branch conflicted with quattro, where the force-kill toast now goes through omarchy-i18n. I merged quattro into the branch and kept its translated toast. Against quattro, the change is still just the three-line guard in stop_screenrecording and its test assertion.

What was checked, on a worker built from the Omarchy ISO:

  • Reproduction: test/shell.d/screenrecording-test.sh with quattro's script fails the new assertion. Stopping with no saved pid posts "Screen recording saved" with --image -preview.png and mpv -- on an empty filename, the empty-name toast from Screen recording: stopping twice posts two "saved" toasts and a broken thumbnail #11508. On this head all 31 pass.
  • test/cli passes. The full shell suite passes except for tests that also fail on quattro itself, none of which touch screen recording.
  • CI is green.

On the quoting suggestion above: the guard is already safe. Inside [[ ]], a command substitution undergoes no word splitting and no globbing. On the worker, a recording path containing spaces is found and finalized, and an empty or missing state file makes the guard skip as intended. No change was made for it.

Second opinion: Codex Medium reviewed this head and found no defects. It also reproduced the bug against quattro's stop function and agreed that the quoting concern does not hold. It can read this session's working notes, so its agreement is not guaranteed to be independent.

This now waits on the maintainer.

@omarchybot
omarchybot merged commit 0fc420c into quattro Oct 31, 2026
2 checks passed
omarchybot added a commit to ReneXiong/omarchy that referenced this pull request Nov 1, 2026
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.
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
berenddeboer pushed a commit to berenddeboer/omarchy that referenced this pull request Nov 6, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Screen recording: stopping twice posts two "saved" toasts and a broken thumbnail

3 participants