wealth/docs/decisions/0058-notifications-seen-and...

1.2 KiB

0058 Opening notifications clears the bell; a row is read when tapped

Status: Accepted · Area: architecture · Date: 2026-10-10 · Decided by: user · Supersedes: 0032

Context

The new canvas (J07-5h, A9) keeps an unread dot on each row until it is tapped, while opening the list clears the bell count. 0032 marked everything read on open.

Decision

  • ROUTES.notifications (/notifications) is a (main) page in both apps; bull's bell links there, bear's header bell opens the 400px side panel, loaded on the first click; a direct visit renders the page.
  • Opening the list records "seen" (POST /v1/notifications/seen), which zeroes the bell count. A row stays unread, with its dot, until it is tapped (POST /v1/notifications/:id/read).
  • Creators get one list with filter chips «همه · پیش‌بینی‌ها · مالی · حساب» that filter in place; categories come from the notification type.
  • The bell shows for a member of either role on every tab bar and the desktop header.

Alternatives

  • Mark all read on open (0032): loses which rows the person never looked at.

Consequences

The API keeps seenAt per user beside each row's readAt.