Repository navigation
Integrate notification delivery, layout, and flood control - #21030
chessing234 wants to merge 16 commits into
Conversation
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.
Confidence Score: 5/5
[Medium impact] The latest changes appear safe to merge. SummaryIntegrates notification sounds, browser expiry, bar-following placement, stable button layout, and per-sender flood control.
Reviews (3) · Last reviewed commit: "Anchor notification decks to the screen ..." · Reviewed by Greptile |
|
ready for a look @dhh @ryanrhughes |
|
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! |
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, andtest/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.
message-new-instant, or the sender'ssound-name), andsuppress-soundis honored. A burst inside 200ms is one sound.app_iconis a path, the icon falls back to the desktop-entry hint.cardYand still respects a card that is narrower than the deck.flooded. Do Not Disturb and fullscreen still spend nothing.Conflict resolution and extra fixes
knownid) is not treated as a duplicate, and a flood summary is not itself a duplicate of the cards it counts.Delivery.expiryUrgencyon the way in and again whenlive.jsonis restored. Sticky cards still wait. History still recordsfullscreenand nowflooded.Markup.jsalready treated Opera, LibreWolf, and Ardia as browsers.Delivery.BROWSER_APPSdid not, so a critical from those three waited forever. They now expire like the other browsers. The logic test lists them.service.placements, so it sees the live property. The logic test stubsplayArrivalSound, loadsliveRowsforlayoutWith, and setsfocusedDisplayNameinstead of assigning thetargetDisplayNamegetter. The deferred size test's closing brace is restored where the flood cases were joined on.Testing
node test/shell.d/notifications/logic.cjspassed, including quiet reasons, browser expiry, bar-follow keyboard reach, deferred sizes, web-app focus, icons, and flood control.test/shell.d/notifications-test.shgets through the logic pass, then stops onchmod: --: No such file or directorywhile preparing the state directory. That is BSDchmodon 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