Repository navigation
Collapse identical notifications arriving together into one card again - #18349
Merged
Merged
Conversation
A web app open in several tabs fires one notification per tab for a single reminder: a HEY calendar reminder arrived from Chromium twice, 12 ms apart, under ids 9 and 10, and stayed on screen as two identical critical cards. #13522 collapsed these, but the check went out with the old engine when the notification engine was replaced (4671ae2), and the new one never gained it. A new notification that repeats a live card word for word within two seconds now takes over that card's slot, the way a replaces_id update does: one card, one history entry, and the superseded copy is closed at its sender. Same means the same app, source, headline, text, click command and buttons. The picture is not compared, since Chromium hands each copy its own temporary file; the click command is, since every screenshot toast shares its text but opens a different file. The same words after the window are a second message, and a card on its way out is not brought back by a copy of itself. Co-Authored-By: Claude <noreply@anthropic.com>
dhh
marked this pull request as ready for review
November 10, 2026 11:06
Contributor
[Medium impact] The PR appears safe to merge; both previous findings are fixed. SummaryCollapses matching notifications arriving within two seconds into one card and closes the superseded sender.
Reviews (2) · Last reviewed commit: "Keep unnamed toasts in their own decks a..." · Reviewed by Greptile |
… own cards Two regressions in the duplicate collapse, both found in review. The row was snapshotted before its key was chosen, so an omarchy-action or notify-send toast, which is grouped by its own key, got the group "toast:" with no key: unrelated notices fell into one deck, the newest hiding the rest. The group is rebuilt once the key is known. The match compared Omarchy's command hints but not the sender's own actions, so the same words offering Reply and then Join merged, and the first button was lost with its sender. A copy now has to offer the same buttons as the card it repeats. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A web app open in several tabs fires one notification per tab for a single reminder. A HEY calendar reminder arrived from Chromium twice, 12 ms apart, under ids 9 and 10, and stayed on screen as two identical critical cards.
#13522 collapsed these, but the check went out with the old engine when the notification engine was replaced (4671ae2), and the new one never gained it.
What changes
A new notification that repeats a live card word for word within two seconds now takes over that card's slot, the way a
replaces_idupdate does: one card, one history entry, and the superseded copy is closed at its sender.Store.isDuplicate).Testing
test/shell.d/notifications-test.shpasses, with a new case modelled on the HEY duplicate (a copy landing before the first card is shown, and one landing on the shown card) plus the cases that must stay separate. The new case fails with the matcher disabled. The test fixtures now give each fake sender its own body, since identical ones arriving together are one card.Not exercised against a live Chromium notification.
🤖 Generated with Claude Code