Repository navigation
Let a browser's critical notifications time out - #16689
ThatRetiredDude wants to merge 3 commits into
Conversation
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge. SummaryBrowser critical notifications now expire instead of waiting for dismissal.
Reviews (5) · Last reviewed commit: "Document that a browser's critical notif..." · Reviewed by Greptile |
|
#16690 makes the same change for #16640, and #16641 is a double submission of that report. Both let a browser's critical cards time out like normal ones while other senders' criticals keep waiting. This one reuses |
|
Thanks @ThatRetiredDude. I read the diff, the linked report #16641 and the existing comments; nothing was run yet, because the classification is unsettled and it stops here until that is decided. Why it is unsettled. Two models classified this separately and disagreed. I (Claude Opus 5.5) read it as a bug fix: a site's everyday web pushes arrive from the browser as critical, and Related. #16690 makes the same change for the same report (#16640, which #16641 duplicates), opened ten minutes after this one, with its own browser regex in Waiting on the maintainer: whether a browser's critical may time out at all, which also settles whether this is a fix or a change in behaviour. Once that is decided it goes on to review and a test run on a worker. |
da1e443 to
b16fc61
Compare
|
I read the revised diff and #13153. The revision now gives restored browser cards a timeout too and documents both paths. GPT-6.2 Sol in Codex (high effort) classified it as an enhancement because it changes the documented lifetime for all critical notifications from recognized browsers. DeepSeek ( |
Sites can have the browser send their pushes critical, and many do it for everyday ones, so they stacked up until dismissed by hand. Critical still waits for every other sender.
A card restored after a restart or replayed from history went back to never expiring, because the restore path had its own critical rule.
b16fc61 to
12ffbd7
Compare
Sites can have the browser send their pushes critical, and many do it for everyday ones, so they stacked up until dismissed by hand. Critical still waits for every other sender.
Fixes #13153 (also reported as #16641).
Problem
A site can have the browser send its web-push notifications with critical urgency, and many sites (YouTube, for example) do this for everyday pushes.
durationForinshell/plugins/notifications/Service.qmlgives every critical notification a lifetime of 0, so these cards never expire and stack up until dismissed by hand.Change
durationFornow takes the sender's app name and keeps the never-expire lifetime for critical notifications only when the sender is not a browser. It reuses the existingMarkup.isBrowserlist (Chrome, Chromium, Brave, Edge, Vivaldi, Opera, Helium, Firefox, Zen, LibreWolf), so a browser's critical card gets the normal 8s lifetime, stretched up to 30s if it asks for longer. The card keeps its critical urgency for everything else, and Do Not Disturb is unchanged.This follows the same reasoning as
Delivery.bypassesQuiet, where critical urgency alone isn't trusted because apps use it to force visibility. Critical alerts from Omarchy's own commands,notify-send, and other apps still wait for you.Tests
Added a case to
test/shell.d/notifications/logic.cjs: critical notifications from Chromium and Google Chrome get an 8s duration, while critical ones fromnotify-sendand Slack keep 0. The case fails onquattro(Chromium gets 0), andtest/shell.d/notifications-test.shpasses with the change.The change was written with AI models under my direction. I reviewed it myself, and the testing above was run before opening this PR.