Files
romm/docs
zurdi 8b25efa2aa feat: let the frontend and API clients send notifications
Notifications could only come from backend code, and only in the kinds the
web client knows how to translate. Anyone can now send one that carries its
own text.

- A notification can carry its own title, body, icon and in-app link. RomM's
  own kinds stay translated; `custom` and any other kind (`argosy.sync_done`)
  is shown with its own content.
- POST /api/notifications: anyone with me.write notifies themselves; an admin
  can also notify user ids, `admins` or `all`, and is shown as the sender.
  RomM's own kinds are reserved, links must stay inside RomM, and `data` is
  capped at 4 KB.
- notify()/notify_admins() accept the same title/body/link/icon.
- Frontend: `snackbar.success(msg, { persist: true })` (or
  `{ persist: { body, link } }`) also keeps the message in the inbox. The
  first of the request's answer or the socket push shows the toast, so it
  appears once.
- Documented in BACKEND_ARCHITECTURE and the backend and frontend skills.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 12:12:55 +02:00
..