Skip to content

Add duration backstop to launch feedback OSD (#11559) - #11568

Closed
Cid-oe wants to merge 1 commit into
omacom:quattrofrom
Cid-oe:fix/issue-11559-launch-feedback-osd-timeout
Closed

Cid-oe wants to merge 1 commit into
omacom:quattrofrom
Cid-oe:fix/issue-11559-launch-feedback-osd-timeout

Conversation

@Cid-oe

@Cid-oe Cid-oe commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #11559

Problem

AppLibrary.qml shows launch feedback with duration: 0 when an application launch takes longer than 2 seconds. When the toplevel window registers nearly simultaneously with the 2-second delay timer, omarchy-shell osd close and omarchy-shell osd show can race over asynchronous IPC. If the close command is handled before the show command, the OSD remains permanently visible with duration: 0 and no further timers scheduled to close it.

Solution

  • Provide a 15-second (duration: 15000) backstop on the launch feedback OSD matching the maximum launchTimeout interval. Even if the explicit osd close IPC races or drops, the OSD safely auto-dismisses after 15 seconds.
  • Add test coverage in test/shell.d/app-search-test.sh verifying that launch feedback OSD specifies the duration backstop.

Fixes #8242

Fixes #12123

Fixes #13535

Fixes #13707

Fixes #9817

Fixes #11668

Fixes #11928

Fixes #12573

Fixes #13973

@paulogeyer

paulogeyer commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Soak on 4.0.4-1: close-then-show with duration: 0 sticks; same race with duration: 15000 opens and closed by itself at ~16s. Close still gated on launchOsdOpen — always-close hid the toast.

This matches Grok/Cursor (#9817).

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and verified at bcf7843 against quattro.

Reproduced on a worker. On a VM built from the Omarchy ISO, running the shell from this branch, I launched a desktop entry whose window maps about 2.4 s after launch from the Omarchy menu, with every omarchy-shell osd show delayed by 1.5 s so the osd close overtakes it — the ordering #11559 describes. With quattro's AppLibrary.qml the "Launching…" OSD was still open 26 s later, in two separate runs. With this change it closed on its own between 16 and 19 s. Without the delay it still opens at 2 s and closes as soon as the window appears, so the normal path is unchanged.

Tests. ./test/shell (3269 passed, 0 failed) and ./test/cli passed on the same worker.

Second opinion. Codex (medium effort) reviewed this change and found no defect. It confirmed the 15 s duration does not outlive a later OSD, such as volume, which brings its own duration, and does not cut a second launch's feedback short. It agreed this is the change to take; its independence from my review is not guaranteed.

Other pull requests for the same bug. #13536, #13669 and #13802 make the same change with a different duration expression. #13606 also adds polling and shortens the launch timeout to 8 s, which is more than the bug needs. #9819 removes the race itself by driving the OSD in-process through shell.summon/shell.hide, but it conflicts with quattro. Codex also found a path in it where a show still queued while the OSD plugin is loading survives hide() and opens with duration: 0 after the launch is over. This one bounds the stuck OSD at about 15 s rather than preventing the race, so in the race the toast lingers that long after the window opens.

I linked #8242, #12123, #13535 and #13707, which describe the same lost or reordered close, so they close with this. Nothing is needed from you; this is waiting on the maintainer.

@jandrusk

Copy link
Copy Markdown

Same fix idea as open #13669 (Give launch OSD a finite duration backstop). #11559 is already closed. Prefer landing one of these two (or closing this as superseded by #13669) so AppLibrary doesn't get conflicting duration constants.

@omarchybot

Copy link
Copy Markdown
Collaborator

Looked at this again at bcf7843 now that it conflicts with quattro, and against the other open fixes for the stuck "Launching…" OSD.

The conflict. It is only in test/shell.d/app-search-test.sh: #16334 removed every test there that regexes AppLibrary.qml or Menu.qml source, and the assertion this branch adds is one of those. Merging quattro and taking its copy of that file leaves the one-line duration: 15000 change in shell/services/AppLibrary.qml as the whole diff. I have not pushed that, for the reason below.

Competing fixes. #9819 (opened before this one) removes the race itself by showing and closing the OSD in-process through shell.summon/shell.hide, and it now merges cleanly with quattro and was verified on a worker. #13536 and #13606 are the other open ones. Under this project's rule the oldest fix wins unless a newer one is clearly better, and a duration backstop bounds the race rather than removing it: when the close overtakes the show, "Launching…" still sits on screen for up to about 17 s after the window opened. So #9819 is the one I am recommending.

What this one adds is real, though. #9819 keeps duration: 0, and while the OSD plugin is still loading (shell start, or a plugin reload) hide() does not cancel a queued summon() (shell/shell.qml:1209-1283), so that show can still open late and never close. A finite duration on #9819's payload closes that gap, so I have handed the finite duration over to be folded into #9819, credited to you. #13536's choice of launchTimeout.interval - launchDelay.interval (13 s) lines the dismissal up with the existing 15 s launch deadline better than a flat 15000.

Second opinion. Codex Medium compared all four diffs against quattro without my conclusion and preferred this pull request, on the strength of that #9819 loading-time gap; I confirmed the gap in source. With the duration folded into #9819 that gap is covered while the race is also gone, which is why I have come down the other way. Its independence is not guaranteed. Nothing was run on a worker this time.

This waits on the maintainer to choose between the approaches; nothing is needed from you.

@Cid-oe

Cid-oe commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Closing this - the launch OSD backstop is on main now (launchTimeout in AppLibrary.qml) and #11559 is closed.

@Cid-oe Cid-oe closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment