Repository navigation
Conversation
`beginLaunchFeedback` restarted `launchTimeout` on every invocation, so retriggering a launch pushed the 15s safety-net back each time and the toast could stay on screen indefinitely. - Start `launchTimeout` only when it is not already running; the first launch's deadline still bounds the feedback - `launchDelay` still restarts so a retriggered launch updates the toast text Fixes omacom#12922. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Automated AI review
Verified: the timer change behaves as described. On a running QML Two points may affect whether this closes #12922, plus a test note. The reported stuck toast is not explained by
|
| Toast lifetime after the last retrigger | |
|---|---|
| Base | closes when a window appears, otherwise at most 15 s after the last launch |
| This PR | closes when a window appears, otherwise at the first pending launch's 15 s deadline |
The issue describes a different symptom: the toast stayed after the window had opened, until omarchy-shell osd close was run by hand. That requires a close that never took effect. Two further source observations:
- The issue's reproduction steps do not reach this code at the reviewed head. The Files binding (
SUPER + SHIFT + F) andomarchy launch nautilusboth runbin/omarchy-launch-nautilus, which starts Nautilus directly. Only the shell menu's app list (shell/plugins/menu/Menu.qml) and plugins using the app-library API callbeginLaunchFeedback. AppLibrary.qml,Osd.qml,OsdModel.jsandbin/omarchy-shellat thev4.0.4tag (the reporter's version) are byte-identical to this PR's base.
Possible cause (source reading only, not reproduced): the launch OSD show (with duration: 0) and its close are sent as two independent Quickshell.execDetached processes, each running its own omarchy-shell IPC call, with nothing ordering them.
launchDelay fires -> launchOsdOpen = true; spawn "osd show" (duration 0)
window opens soon after -> closeLaunchFeedback: spawn "osd close"; launchOsdOpen = false
IPC handles close first -> nothing shown yet, close has no effect
IPC handles show second -> OSD opened, no hide timer
AppLibrary -> launchOsdOpen already false, so no further close is sent
Impact: the Fixes #12922 keyword would close the issue automatically while the reported symptom may still occur.
Suggested change: confirm the stuck toast reproduces through the app menu before the change and not after. If the ordering race is the cause, giving the launch OSD a finite duration (for example the same 15 s) would bound it even when a close is lost. Sending show and close through one ordered path would also address it. Without such a reproduction, Refs #12922 may fit better than Fixes.
A different app launched near the first deadline loses its feedback
The timeout is no longer restarted for a new launch, but it still closes whichever launch is current. If app A has not opened a window and app B is launched from the menu shortly before A's deadline, B's feedback is cut off:
Head, derived from source reading (not reproduced); neither app has opened a window yet
t=0 launch A -> launchDelay 2 s, launchTimeout armed for t=15
t=2 "Launching A…" shown
t=14 launch B -> launchDelay restarted (would fire t=16); timeout kept at t=15
t=15 timeout -> closeLaunchFeedback(current serial = B): delay stopped, OSD closed
B never shows "Launching B…"
Base: the timeout restarts at t=14, so "Launching B…" shows at t=16 and lasts until
B's window appears or t=29.
If B is launched earlier than 13 s, its toast appears but closes at A's deadline even if B is still starting.
Impact: feedback only; B still launches. A plausible trigger is a slow or silently failed first launch followed by trying a different app.
Suggested change: keep the running deadline only when the retriggered launch is the same desktop ID, and start a fresh 15 s window for a different app. The PR description presents the first-deadline behaviour as intended, so documenting this trade-off is an alternative.
Optional test improvement: test/shell.d/app-library-launch-test.sh checks source text only. Its first check, a file-wide grep 'launchTimeout\.running', already passes on the unfixed base because it matches maybeFinishLaunchFeedback. A variant that re-adds launchTimeout.restart() after the guard passes every assertion. Asserting that launchTimeout.restart() is absent from the beginLaunchFeedback body, and scoping or dropping the file-wide grep, would make the test guard the actual bug.
Review information
Test scope: Source review of head 2a98d2c and base 28ceaae, the upstream v4.0.4 tag, qtdeclarative QQmlTimer source (v6.8.3 and v6.11.2) and Quickshell 0.3.1 execDetached. The PR test's bash checks ran in an isolated sandbox against the head, the base and two modified variants. Its Node block could not run there (Node unavailable) and was evaluated with an equivalent regex transliteration. No desktop session was used. The show/close ordering race and the timelines above come from source reading and were not reproduced at runtime.
AI process: Opus 5.5 Medium coordination and synthesis, independent Opus 5.5 Xhigh and GPT 6 Sol Xhigh technical assessments, Opus 5.5 Medium editorial check.
Opt out: To stop receiving these reviews, reply to this comment saying so.
|
Fair point that |
Automated AI review
Follow-up on the earlier review after the author's reply, checked at head Outcome: both earlier findings are resolved at this head, and the test now guards the regression it was meant to catch. One statement in the earlier review was wrong and is corrected below. Four smaller notes follow.
Verified: in a QML model built from each revision's own
The 15 s self-hide counts from when the toast appears, not from the launch deadline. In the reordered case after a same-app retrigger it can therefore last until about 15 s after the retrigger's toast. In normal delivery the timeout or a new window always closes the toast first. The stranding fix from 43c15a4 is still intact, and the existing app-search and OSD tests pass at this head. Correction: the issue's reproduction does reach this codeThe earlier review stated that the reproduction steps in #12922 do not reach
So the reported toast came from this code path. The rest of that finding stands: at base, a toast that stays up longer than 15 s after the last launch still needs a Impact: the PR description repeats the incorrect reason ("The reporter's repro goes through Suggested change: update that sentence. "Same app" is keyed on the display name
Impact: feedback only, and only for name collisions within the 15 s window. It is the earlier different-app case in a narrower form. Suggested change: Stale comment: the comment on Optional test improvement: two one-line regressions still pass every assertion in Related open PRs: #12966 makes this PR's earlier timer change ( Review informationTest scope: Source review of head AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
|
Reviewed at 3d821e3 against The stuck toast needs a lost or reordered close. The launch OSD is shown with That same change is all of #11568, which is older and already carries Also at this head: the comment on Second opinion: Codex Medium was asked which of #13095, #11568 and #12966 is best without being given this conclusion. It picked #11568 for the same reason and independently traced the same-name collision. Its independence is not guaranteed. This is waiting on the maintainer to choose between #11568, #13095 and #12966. Whichever lands, the others touch the same lines of |
|
both of your commits are in #21025. the same app keeps its deadline, and a different app gets a fresh 15s. the show goes through the tracked call, with duration equal to that deadline, not a second detached show. @dhh @omarchybot if 21025 lands, this can close as superseded. |
|
Codex High and Opus 5.5 High compared the fixes with current For repeat launches, both reviews preferred the older #12966 and its Quickshell timing test. Review independence is unverified. I queued this PR’s remaining improvement for #12966. A different app should get a fresh deadline, since reusing the old one can suppress the second toast if less than two seconds remain. Comparing desktop IDs would also give two apps with the same display name separate deadlines. No worker tests ran. This PR stays open for the maintainer’s decision. |
Summary
Refs #12922.
The "Launching …" OSD could stay on screen past its safety net, and once its
closewas missed there was nothing left to hide it.launchDelay.onTriggerednow shows the OSD with a finitedurationequal to the 15s deadline instead ofduration: 0, so the toast self-hides even if the detachedosd closeis processed before theosd show(the two are independentomarchy-shellIPC calls with no ordering between them)launchTimeoutis no longer restarted for a retriggered launch of the same app, so repeated clicks cannot push the deadline out indefinitely; launching a different app starts a fresh 15s window so its own feedback is not cut short by the previous app's deadlinelaunchDelaystill restarts so a retriggered launch updates the toast textThe reporter's repro goes through
omarchy-launch-nautilus, which does not use this code path, so this is filed asRefsrather thanFixesuntil the menu-launch case is confirmed.Test plan
test/shell.d/app-library-launch-test.shasserts the finite OSD duration, the same-app guard on the timeout, and that the timeout is not restarted unconditionallyFixes #10487