mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
Toasts disappear after a few seconds, and nothing reaches a user who has no tab open. Notifications are now stored per user and kept until dismissed, so what a background job or another user did is waiting the next time RomM is opened. Backend: - `notifications` table (0130) with kind, level, data, actor and read_at, capped at the newest 200 per user. - /api/notifications: list, mark read, dismiss one, dismiss all. - notify()/notify_admins() store the row and push `notifications:new` to the user's socket room; read/dismiss push to the user's other tabs. - Producers: a scan's end (to whoever started it; an unattended scan tells the admins when it failed or found new games), a manual task's end (to who ran it; a scheduled task's failure to the admins), an admin ending someone's stream, and an admin changing someone's role. Frontend (v2): - Unread count badge on the navbar avatar, and a Notifications entry in the user menu and settings sidebar. - Notifications view: marks what it shows read, links each row to what it is about, dismiss one or all. - Live toast for a new notification, except scans, which already toast. - The text is rendered from the kind in the reader's language (18 locales). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>