Repository navigation
Conversation
closeLaunchFeedback spawns 'omarchy-shell osd close' as its own process, racing the 'osd show' the 2s launch delay spawned. If close arrives first, the OSD then opens with duration 0, which stops hideTimer and never auto-hides, and no later close can take it down. Stamp each launch's serial into the show payload and record the highest closed serial in a new 'osd closeLaunch <serial>' handler, so a late show for an already-closed launch is dropped however the two IPC calls arrive. Fixes omacom#16808
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryTags launch feedback with a serial so a delayed show cannot reopen an already-closed launch.
No actionable issues found. Runtime and visual checks were not performed.
|
|
Confirmed independently on Verification of this PR:
One residual, not blocking: |
|
Thanks @AnPod. The race you describe is real. If This is one of several open pull requests for the stuck "Launching…" OSD, so I compared them before running anything: #9819, #11568, #13095, #13536, #13606, #15475, #15962 and this one. Policy is that the oldest fix wins unless a newer one is clearly better. The oldest here, #9819 (opened 2026-09-02), already covers what this one does and more. It drops the detached This PR handles close-before-show, but not a close that never arrives. I reviewed the diff and the surrounding Choosing between these fixes is the maintainer's call, so this is now waiting on them. |
|
your commit is in #21025. the show payload includes the launch serial, and close uses closeLaunch so a late show for a closed launch is dropped. osd-test.sh passed those cases here. the show is still the tracked process from #18453, with a finite duration. @dhh @omarchybot if 21025 lands, this can close as superseded. |
|
I compared this diff with A volume or brightness overlay that replaces the launch toast can still be dismissed early when the launch finishes. This PR's serial check protects that replacement. That behavior is with the maintainer to decide whether to carry forward as a separate change. GPT-6 High in Codex, Opus 5.5 High, and muse-wonder via pi at high effort checked the source. The reviewers agreed and their independence from my review is not guaranteed. This was a source-only review. |
Fixes #16808 (also reported as #16814)
Problem
The "Launching …" OSD can stay on screen forever.
closeLaunchFeedbackspawnsomarchy-shell osd closeas its own process, racing theomarchy-shell osd show '{duration: 0}'that the 2 s launch delay spawned. The two IPC calls have no arrival ordering: ifcloselands first, the OSD then opens withduration: 0, which callshideTimer.stop()and can never auto-hide — andcloseLaunchFeedbackskips any further close IPC because it already cleared its state. Under system load, which is exactly when launch delays happen, the inversion is likely.Fix
Serial-tag the launch OSD so the close wins regardless of arrival order:
AppLibrary.beginLaunchFeedbackalready bumps a per-shelllaunchSerial; the show payload now carries it (launch: <serial>).osd closeLaunch <serial>IPC handler records the highest closed serial and closes the OSD if the launch it is showing is that launch or older.closeLaunchFeedbackcalls it instead ofosd close.Osd.opendrops a show whoselaunchserial is already closed, instead of opening a sticky duration-0 OSD. A launch-less show (volume, brightness, media — every other caller routes through the sameopen) clears the launch serial, so itscloseLaunchcan never take the replacement down.Osd.closealso records the launch it is showing, so a manualomarchy-shell osd closebeats the in-flight show of that launch too.The existing
osd closehandler and its argument count are unchanged, so all other callers keep working.Test
Extended
test/shell.d/osd-test.sh: extractsOsd.qml'sopen/closeand thecloseLaunchhandler and runs them against a bare stand-in, covering close-before-show (dropped), show-then-close (closed), manual close beating an in-flight show, a generic OSD surviving an old launch'scloseLaunch, and a newer launch still opening after a close. The new assertions fail on clean quattro (the handler does not exist) and pass with the fix; the pre-existingOsdModelassertions in the file are untouched.