Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; the restore fix preserves the intended behavior for browser and non-browser criticals. SummaryBrowser critical notifications now expire like normal notifications, while keeping their critical appearance.
The previous restore finding is fully addressed. No new actionable issues were found. Reviews (2) · Last reviewed commit: "Expire restored browser web-push critica..." · Reviewed by Greptile |
|
@dhh @omarchybot expiring browser web-push criticals is in #21030, on arrival and when A sticky card and a sender's own critical still wait. History still records Please consider closing this as superseded only after #21030 is accepted. Leaving the close to you. |
Fixes #16640 (also reported as #16641).
Chromium relays web pushes (YouTube and the like) with
urgency=criticalandexpire_timeout=0.durationFor()inshell/plugins/notifications/Service.qmlgives every critical a lifetime of 0, so these cards pile up until dismissed by hand. The DND path already distrusts criticals that don't come fromnotify-send(Delivery.bypassesQuiet), but the lifetime path had no such distinction.shell/plugins/notifications/Delivery.js: new pure helperexpiryUrgency(row, urgency). A critical from a browser app name (chrome, chromium, firefox, zen, brave, edge, vivaldi, helium, word-bounded and case-insensitive) counts as normal for its lifetime only. Every other sender, includingnotify-send, keeps its urgency.shell/plugins/notifications/Service.qml:handleNotificationpasses the row throughDelivery.expiryUrgencybeforedurationFor. The row's ownurgencyis untouched, so the card still draws as critical.docs/notifications.md: the toast lifecycle sentence states the browser rule.Tests:
test/shell.d/notifications/logic.cjscoversexpiryUrgencyand a service-level case where a critical fromGoogle Chromegets the normal duration while a non-browser critical still gets 0. Red without the source change, green with it;bash test/shell.d/notifications-test.shpasses. Not checked in a running Hyprland session.