In-app notifications
Keep every notification in a server inbox, sync read state everywhere, deliver new items live, and announce them to screen readers without moving focus.
- Required 2
- Recommended 3
Required
Store every notification in a server-side inbox
RequiredWrite every notification to an inbox table on the server first, and let push, text and email point to that row. The browser never holds the only copy.
Announce new items without stealing focus
RequiredAnnounce new notifications to screen readers through a polite live region, and never move focus or open a dialog for them.
Recommended
Keep read state the same everywhere
RecommendedMark an item read once on the server, and clear it in every open tab, every device badge and any pending reminder.
Deliver new items live and catch up after a gap
RecommendedPush new inbox items to open pages over one live connection, and fetch what was missed after every reconnect.
Delete old inbox items on a schedule
RecommendedDelete inbox items after a fixed time, such as 90 days, and show the limit in the inbox.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers notifications playbook: https://agentwranglers.se/playbook/notifications/in-app-notifications.