Repository navigation
fix(notifications): mark a notification read when its toast is opened - #242
Merged
Merged
Conversation
andrebrait
force-pushed
the
fix/toast-click-marks-read
branch
from
October 10, 2026 07:33
e42d0f7 to
4bec966
Compare
andrebrait
added a commit
to andrebrait/ompweb
that referenced
this pull request
Oct 10, 2026
…s toast is opened Squashed from origin/fix/toast-click-marks-read (4bec966) onto upstream/main.
andrebrait
added a commit
to andrebrait/ompweb
that referenced
this pull request
Oct 10, 2026
…s toast is opened Squashed from origin/fix/toast-click-marks-read (4bec966) onto upstream/main.
andrebrait
added a commit
to andrebrait/ompweb
that referenced
this pull request
Oct 10, 2026
…nly pushable notification types Squashed from origin/feat/notification-read-state (9edf773) onto upstream/main. Integration fixup: drops kahme247#242's keepRead (update notices are no longer recorded), keeps kahme247#240/kahme247#242's onClick on history entries, and adapts toast.click.test.mjs to the history: true opt-in.
…ks-read # Conflicts: # CHANGELOG.md # components/ui/toast.tsx
andrebrait
added a commit
to andrebrait/ompweb
that referenced
this pull request
Oct 10, 2026
Resolve the overlap with kahme247#242: drop its keepRead (update notices are no longer recorded), keep onClick on history entries, and opt the click tests into history: true.
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.
Follow-up to #230 and #218.
Problem
Clicking or tapping an in-app notification toast opens the session it came from, but its entry in the Notifications tab stayed unread and kept counting toward the panel-toggle badge. Following a notification means the user has seen it, so it should be read.
Changes
toastHistory.markRead(id)marks one entry read; it is a no-op (no subscriber wake-up) when the entry is gone or already read.recordused to keep the read state of any reused id. Session notifications reuse<sessionId>:<type>as their id, so once a tap marked one read, every later notification of that kind for that session would have arrived already read. Keeping the read state is now opt-in through akeepReadtoast option, used by the two update notices (re-announced unchanged on every tab focus).Not covered: clicking a system (OS) notification. On
mainthose are not in the Notifications tab yet; #240 adds them, and marking them read on click can follow once it lands.Verification
toast.click.test.mjs: a card click and Enter on the card mark the entry read; the guarded interactions leave it unread. Both new assertions fail without thetoast.tsxchange.toast.test.mjs: after Mark all as read, a session notification with a reused id is unread again, while akeepReadupdate notice stays read.npm test1298/1298; typecheck clean; eslint has no errors (only existing warnings inAppShell.tsx).