Skip to content

Integrate notification delivery, layout, and flood control - #21030

Closed
chessing234 wants to merge 16 commits into
omacom:quattrofrom
chessing234:integrate/notifications
Closed

chessing234 wants to merge 16 commits into
omacom:quattrofrom
chessing234:integrate/notifications

Conversation

@chessing234

Copy link
Copy Markdown
Contributor

Why this is one review

These ten PRs all change the notification daemon: who counts as a browser, how long a card stays, where the deck sits, how a card is drawn, and what happens when one sender arrives in a burst. They meet in shell/plugins/notifications/Service.qml, Delivery.js, Store.js, Toast.qml, docs/notifications.md, and test/shell.d/notifications/logic.cjs. Reviewed apart, each one rewrites the same admission function and the same logic test.

Incorporated PRs

Authorship is the original commits.

PR Author What landed
#20933 @nagarete Ardia is a browser, so a web notification shows the page's message instead of the browser's summary.
#18747 @aklecks A new card plays the desktop sound theme's arrival event (message-new-instant, or the sender's sound-name), and suppress-sound is honored. A burst inside 200ms is one sound.
#19031 @falkoro When app_icon is a path, the icon falls back to the desktop-entry hint.
#20069 @jaapie Hover that opens a card's text does not move its buttons out from under the pointer.
#16965 @xvvhang The deck follows the bar: left when the bar is on the left, growing upward when the bar is on the bottom. Hit testing uses cardY and still respects a card that is narrower than the deck.
#17661 @kiatng A web app window wins over the shared browser PID when the notification names that site.
#16690 @AnPod A browser's web-push critical expires like a normal card, including after a restart. A sticky card and a sender's own critical still wait.
#17951 @amuif A card's own height breaks the placement binding loop.
#20926 @grold Placement updates that arrive during layout are deferred, so the deck does not read its own bindings mid-update.
#21015 @photuris One sender is limited to a token bucket (10, refilled one every 3s). Criticals have their own bucket. The excess is one summary card, recorded as flooded. Do Not Disturb and fullscreen still spend nothing.

Conflict resolution and extra fixes

  • Arrival sound and flood control both sit in admission. A replacement (known id) is not treated as a duplicate, and a flood summary is not itself a duplicate of the cards it counts.
  • Browser criticals use Delivery.expiryUrgency on the way in and again when live.json is restored. Sticky cards still wait. History still records fullscreen and now flooded.
  • Markup.js already treated Opera, LibreWolf, and Ardia as browsers. Delivery.BROWSER_APPS did not, so a critical from those three waited forever. They now expire like the other browsers. The logic test lists them.
  • The animation snapshot reads service.placements, so it sees the live property. The logic test stubs playArrivalSound, loads liveRows for layoutWith, and sets focusedDisplayName instead of assigning the targetDisplayName getter. The deferred size test's closing brace is restored where the flood cases were joined on.

Testing

node test/shell.d/notifications/logic.cjs passed, including quiet reasons, browser expiry, bar-follow keyboard reach, deferred sizes, web-app focus, icons, and flood control.

test/shell.d/notifications-test.sh gets through the logic pass, then stops on chmod: --: No such file or directory while preparing the state directory. That is BSD chmod on this Mac. I did not run the shell under Quickshell.

Closure of the original PRs is the maintainers' call, after this is accepted.

Made with Cursor

nagarete and others added 14 commits December 1, 2026 08:28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A notification arrival now plays one themed event (message-new-instant)
through canberra, the way the desktop's other arrival sounds work: one
sound the desktop owns, not a jingle per app, which also stops app
sounds from bypassing Do Not Disturb. The sound sits on the delivery
decision: a silenced notification is silent all the way down, and a
critical one sounds because it is shown. A replacement, a duplicate that
takes over a card, and a row restored at startup do not re-sound.

Senders are honoured on both spec hints: sound-name picks a themed
event (a bounded theme name, never a path), suppress-sound refuses the
sound. Arrivals inside 200ms of each other coalesce into one event.
A card shows two lines of its text and opens to eight when hovered.
The button bar sits along the card's bottom edge, so on a card with
buttons the bar slid down as the pointer reached for it, and the click
missed or landed on the text.

A card with buttons now shows its text open from the start, so hover
has nothing to grow. Those are also the cards read before choosing.
The rule lives in Delivery.bodyOpen with a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Codex <noreply@openai.com>
A card showed its button bar from place.front, but placements depends on
every card's height, and showing the bar changes that card's height:
shown -> targetHeight -> noteHeight -> land -> layout -> placements ->
place -> shown. Qt cut the cycle with "Binding loop detected" warnings for
layout, placements and shown during ordinary notification use.

Which card leads a deck depends only on row order, so the service now
gives each card a front flag from Layout.fronts(), read from the live rows
without heights or layoutRevision. Leaving cards keep their departure's
flag, as before.
…ize test

Markup already treats those apps as browsers, so a critical from them was still waiting for dismissal. The deferred card-size test also lost its closing brace where the flood cases were joined on.
The size test replaces placements with a getter after the snapshot function is loaded. Reading service.placements uses that getter, and the test now stubs the arrival sound and loads liveRows, which layoutWith calls.
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The latest changes appear safe to merge.

Summary

Integrates notification sounds, browser expiry, bar-following placement, stable button layout, and per-sender flood control.

  • A sender’s notification bursts turn into one counted summary card.
  • Notification cards follow the bar and stack inward from its edge.
  • Browser-relayed critical notifications expire like normal cards.
  • New notification cards can play the desktop arrival sound.
  • Cards with buttons show their text before the pointer reaches them.
  • Card size changes wait until the current layout update finishes.
  • A notification for a website focuses its matching web-app window first.
  • Path-based app icons fall back to the desktop-entry icon name.

Reviews (3) · Last reviewed commit: "Anchor notification decks to the screen ..." · Reviewed by Greptile

Comment thread shell/plugins/notifications/Service.qml Resolved
Comment thread shell/plugins/notifications/Service.qml Resolved
Comment thread shell/plugins/notifications/Service.qml Resolved
Comment thread shell/plugins/notifications/Service.qml Resolved
@omarchybot omarchybot added the enhancement New feature or request label Dec 2, 2026
Comment thread shell/plugins/notifications/Service.qml Resolved
@chessing234

Copy link
Copy Markdown
Contributor Author

ready for a look @dhh @ryanrhughes

@emirb

emirb commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for the time you put into this. Some of the fixes you added on top catch real bugs in the original PRs. I'm closing it anyway, along with the other Integrate PRs.

Each bundle puts several people's work in one branch. We can't review it one change at a time or revert a single piece. Merging it would also leave every original PR open. That's why our PR template asks for one problem per PR.

None of the bundles ran on an Omarchy install either.

Please post each fix on the PR it belongs to, so its author can pick it up. If two PRs conflict, a comment on the later one helps us most. A small fix of your own, tested on a real install, is always welcome. Smaller and proven gets merged. Thanks!

@emirb emirb closed this Dec 2, 2026
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.