Repository navigation
Conversation
Automated AI review
Verified: at head Short critical timeouts get no minimum lifetimeAt head, the critical branch returns the requested duration directly, while low and normal toasts are clamped to at least 5 s and 8 s. A critical toast with a short timeout therefore leaves the screen sooner than a normal one with the same timeout (see the 3000 ms rows above). Four in-tree critical callers pass short timeouts: the screen-recording error notifications in Impact: these error toasts go from staying until dismissed to showing for 3 to 5 seconds, shorter than an ordinary notification with the same timeout. Suggested change: apply the normal floor when a critical sender requests a timeout, for example Documentation: the new code comment and the PR description say the FreeDesktop spec requires honouring a timeout regardless of urgency. Spec 1.3 says Optional test improvement: Note for maintainers: the low-battery warning is sent once per discharge cycle. At head it leaves the screen after 30 seconds (unless hovered) and remains in history. The issue also proposed a narrower alternative that keeps critical toasts on screen but stops restoring them once Review informationTest scope: source review of the notification service, 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. |
|
Small consistency nit (non-blocking): Low/Normal durations clamp with If the intent is “honour the requested timeout but still bound the UI,” consider: return requested > 0 ? Math.min(maxPopupDuration, requested) : 0If Critical is deliberately uncapped per the notification spec, ignore this — just flagging the asymmetry. |
|
Reviewed at Two other open pull requests fix the same bug in the same function, so this one was compared against them rather than run on a worker:
What separates this pull request from #13100 is a product choice. Here, a critical toast gets exactly the timeout its sender asked for. So the screen-recording errors in Claude Opus 5.5 preferred #13100, because it keeps the rule that already applies to low and normal toasts and keeps the docs accurate. Codex Medium, asked separately which of the three was best, preferred this pull request, because it honours what the sender asked for without adding a floor or a cap. It found no functional defect here, and it agreed that the docs and the If this approach is chosen, it needs two follow-ups: the |
|
Thanks @Cid-oe, this fixes the same explicit-critical-timeout bug as #12964. We compared the five direct candidates on current |
|
Following up on the earlier comment, which compared this pull request only with #13100 and #13673. #12964 also fixes #12911 in #12964 makes the same change as this branch: a critical toast that asks for a positive timeout gets that timeout, with no 8s floor, and an untimed critical toast ( Nothing was run on a worker for this pull request, because only one of the competing fixes needs verifying. Claude Opus 5.5 compared the diffs of #12964, this pull request, #13100, #13159 and #13161. Codex Medium was asked separately which fix should win, without being told this answer. It also chose #12964 and found no defect that would disqualify it. Its independence from this review is not guaranteed. This now waits on the maintainer. If #12964 lands, this pull request can be closed. |
|
Thanks @Cid-oe! In the new notification engine (#15932) that's deliberate: critical means "stays until you dismiss it" ( |
Closes #12911.
Per the FreeDesktop notification specification, an explicit non-zero
expireTimeoutshould be honoured regardless of urgency. Previously,durationFor()unconditionally returned 0 for Critical notifications, ignoring finite timeouts requested by senders (such as low-battery warnings) and causing toasts to persist indefinitely across reboots.