Commit e2630d5
committed
feat(webapp): add dashboard platform notifications service & UI
Introduce a new server-side service to read and record platform notifications
targeted at the webapp.
- Add payload schema (v1) using zod and typed PayloadV1.
- Define PlatformNotificationWithPayload type and scope priority map.
- Implement getActivePlatformNotifications to:
- query active WEBAPP notifications with scope/org/project/user filters,
- include user interactions and validate payloads,
- filter dismissed items, compute unreadCount, and return sorted results.
- Add helper functions:
- findInteraction to match global/org interactions,
- compareNotifications to sort by scope, priority, then recency.
- Implement upsertInteraction to create or update platform notification
interactions, handling GLOBAL-scoped interactions per organization.
These changes centralize notification read/write logic, enforce payload
validation, and provide deterministic ordering and unread counts for the
webapp UI.1 parent b175d2c commit e2630d5
File tree
2 files changed
+386
-174
lines changed- apps/webapp/app
- routes
2 files changed
+386
-174
lines changed
0 commit comments