Repository navigation
Conversation
Critical urgency was hardcoded to duration 0, so battery-low and similar toasts never expired and resurrected on every reboot. Honour a positive expireTimeout (clamped to maxPopupDuration); keep sticky behaviour when the timeout is 0 or absent. Fixes omacom#12911.
|
Verified: No production defect found in the reviewed scope at
Source inspection confirms that live popup countdowns and restart restoration use this duration. With a synthetic persisted critical notification older than its requested 30 seconds, the real expiry helper returns expired using the new computed duration, rather than restoring it indefinitely. Optional test improvement: The new value assertions in Review informationTest scope: Baseline and head notification tests passed. Additional isolated Node diagnostics evaluated extracted, unmodified production JavaScript and a clearly synthetic mutation. No live QML rendering, D-Bus notification delivery, hover timing or actual reboot was tested. Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review. Automated AI review: Astra Medium performed initial inspection and synthesis, with independent technical reviews by Opus 5.5 High and GPT 6 Sol Xhigh. Reported claims were checked against source and targeted evidence; a fresh Astra Medium check assessed presentation and disclosures only. |
|
Tested in the Omarchy VM running Omarchy 4.0.4-1 with Quickshell 0.3.1 and Node v26.8.2:
Works as expected with no issues found. |
The duration assertions called a durationFor defined inside the test, so a regression in Service.qml passed every test: forcing the critical branch back to sticky, or making requestedDuration return 0, left the suite green. The calculation moves into NotificationLogic.js as popupDuration, like the module's other logic, and Service.qml keeps a thin durationFor passing the urgency constants and durations. The tests call the real function, and the restore-expiry assertions take their duration from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Reviewed and verified on a disposable Omarchy worker, with the shell linked to this branch merged onto current I pushed one commit, bf288e9. The new duration assertions in Tests on the worker: Second opinion: Codex Medium reviewed both commits. On yours it agreed the fix is correct and proportionate, which counts for less because its independence from this review is not guaranteed. It also found, on its own, a second regression the copied test missed ( |
[Low impact] The PR appears safe to merge; no blocking issues remain. SummaryCritical notifications now honor positive sender timeouts, capped at 30 seconds. Critical notifications without a positive timeout remain sticky.
Reviews (6) · Last reviewed commit: "test(notifications): assert refreshed ro..." · Reviewed by Greptile |
The docs, the popupExpired comment and a test label still said every critical toast stays until dismissed, which stopped being true when a sender's timeout began to be honoured. Wording from omacom#13100. Co-Authored-By: surim0n <suritech@gmail.com> Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I pushed one commit, 497c45d. It brings in the documentation fix from #13100 by @surim0n, who is credited on the commit. I re-verified this head on a disposable Omarchy worker, with the shell linked to this branch merged onto current Second opinion: Codex Medium reviewed the full diff at this head in two rounds. It found no defects and agreed that the bug is still present on This waits on the maintainer. One choice remains theirs: #13100 sets a minimum of 8s for timed critical toasts, and this pull request does not, so the 3s and 5s screen-recording errors show for exactly as long as they ask. |
quattro added barClearance() beside popupDuration() in NotificationLogic.js and exported it; both are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch stopped merging cleanly once I re-verified the merged head on a disposable Omarchy worker, with the shell linked to the branch. On Second opinion: Codex Medium reviewed the merge resolution and the full diff at e8492fc. It found no defects, and agreed that the resolution loses nothing from either side and works with This waits on CI for the new head, then on the maintainer. |
|
Compared the PRs for critical notifications ignoring the sender's
#12964 is the one to merge: it honours the timeout, keeps untimed critical toasts sticky, clamps like the other urgencies, and moves the logic into Suggestion: add |
|
Re-reviewed the eight commits since e8492fc, which answer the countdown finding above. They hold up. A Verified on a disposable Omarchy worker, with the shell linked to f0f7a5f merged onto current The low-battery warning from Second opinion: Codex Medium reviewed the new commits at f0f7a5f and found no defects. It agreed that the problem was real and the change proportionate. That agreement counts for less because its independence from this review is not guaranteed. It noted that the renewal test passes a 10s duration on a fixture whose This waits on the maintainer. |
|
Thanks @kvnloo! In the new notification engine (#15932) that's deliberate: critical means "stays until you dismiss it" ( |
What
durationFor()mapped every Critical notification to lifetime0, discarding the sender'sexpireTimeout. That made critical toasts with an explicit timeout (e.g. battery-low viaomarchy-notification-send -u critical -t 30000) immortal on screen and resurrect on every reboot viarestorePopups().Why
FreeDesktop treats
expireTimeout == 0as never-expire. A non-zero timeout should still be honoured for critical urgency. Sticky critical (timeout 0/absent) stays intentional.Change
In
shell/plugins/notifications/Service.qmldurationFor():expireTimeout > 0→ finite lifetime fromrequestedDuration, clamped tomaxPopupDurationexpireTimeout <= 0→ still0(sticky until dismiss)Restore already calls
durationFor(entry.urgency, entry.expireTimeout)and archives viapopupExpiredwhen the lifetime has elapsed; snapshots already persistexpireTimeout. No restore-path change required once duration is correct.Tests
Extended
test/shell.d/notifications-test.sh:Fixes #12911.
Fixes #14639