Skip to content

Expire browser web-push criticals like normal notifications - #16690

Open
AnPod wants to merge 2 commits into
omacom:quattrofrom
AnPod:fix/issue-16640
Open

AnPod wants to merge 2 commits into
omacom:quattrofrom
AnPod:fix/issue-16640

Conversation

@AnPod

@AnPod AnPod commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #16640 (also reported as #16641).

Chromium relays web pushes (YouTube and the like) with urgency=critical and expire_timeout=0. durationFor() in shell/plugins/notifications/Service.qml gives 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 from notify-send (Delivery.bypassesQuiet), but the lifetime path had no such distinction.

  • shell/plugins/notifications/Delivery.js: new pure helper expiryUrgency(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, including notify-send, keeps its urgency.
  • shell/plugins/notifications/Service.qml: handleNotification passes the row through Delivery.expiryUrgency before durationFor. The row's own urgency is 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.cjs covers expiryUrgency and a service-level case where a critical from Google Chrome gets 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.sh passes. Not checked in a running Hyprland session.

@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the restore fix preserves the intended behavior for browser and non-browser criticals.

Summary

Browser critical notifications now expire like normal notifications, while keeping their critical appearance.

  • Browser critical notifications now expire while keeping their critical look.

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

Comment thread shell/plugins/notifications/Service.qml Resolved
@chessing234

Copy link
Copy Markdown
Contributor

@dhh @omarchybot expiring browser web-push criticals is in #21030, on arrival and when live.json is restored.

A sticky card and a sender's own critical still wait. History still records fullscreen. Opera, LibreWolf, and Ardia were added to the same browser list Markup already uses, so their criticals do not stay up. The logic test lists them.

Please consider closing this as superseded only after #21030 is accepted. Leaving the close to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chromium web-push notifications use critical urgency and never expire

3 participants