feat(notifications): header bell and notifications page

The bell polls the unread count every 30 s while the tab is visible. Opening it
loads the newest 10 and marks the unread ones read; items link only to paths on
this site. /notifications lists all with paging and Mark all read. Titles and
bodies render from message codes, in English and Chinese.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
This commit is contained in:
ngqileandClaude Opus 5.5 committed 2026-12-02 20:14:48 +08:00
1 parent 72394df1d7
commit a1d13fe8d7
18 files changed
+703 -3

No files matched your search

@@ -22,9 +22,9 @@ Design: `design.md` and `docs/superpowers/specs/2026-12-02-lead-notifications-de
## 3. Portal
- [ ] 3.1 BFF routes `app/api/notifications/**` and `app/lib/services/notifications.ts`.
- [ ] 3.2 `NotificationsBell` in the header (30 s polling while visible, newest 10, opening marks read, click opens the link) and the `/notifications` page with "Mark all read".
- [ ] 3.3 Labels in `defaultMessages.ts` with Chinese in `zh_CN.seed.json`, then `npm run i18n:sql`. `sql/02-notification-labels.sql` holds only the new labels.
- [x] 3.1 BFF routes `app/api/notifications/**` and `app/lib/services/notifications.ts`.
- [x] 3.2 `NotificationsBell` in the header (30 s polling while visible, newest 10, opening marks read, click opens the link) and the `/notifications` page with "Mark all read".
- [x] 3.3 Labels in `defaultMessages.ts` with Chinese in `zh_CN.seed.json`, then `npm run i18n:sql`. `sql/02-notification-labels.sql` holds only the new labels.
- Verify (3.1 to 3.3): `cd solvway-admin-portal && npx vitest run; echo VITEST=$? && npx tsc --noEmit && npm run lint`
## 4. Release