You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(platform): a per-user read watermark for the notification bell #5157
Split from #4708 (item 5 of 7), as triaged on TALE-117.
What the read does now
At feature-train9173785 (services/platform/backend/domains/notifications/service.ts):
unreadCount (:174-190) counts all of the organization's notifications, with a NOT EXISTS (SELECT 1 FROM app.notification_reads r WHERE r.notification_id = n.id AND r.user_id = …) per row.
markAllRead (:215-235) inserts one app.notification_reads row per notification of the organization: INSERT … SELECT n.id, … FROM app.notifications n WHERE n.org_id = … ON CONFLICT DO NOTHING.
The routes are GET /api/app/notifications/unread-count and POST /api/app/notifications/read-all (routes.ts:64-72). They are read by the bell (app/features/notifications/components/notification-bell.tsx:39) and the list panel (notification-list-panel.tsx:144,146).
What to do
Add a per-user read watermark: the newest notification a user has read up to, per organization.
"Read all" moves the watermark.
The unread count only counts notifications after the watermark, less those read one by one.
The security-category visibility rule stays as it is.
Done means:
the count and read-all no longer cost more as the organization's notification history grows;
a migration adds the watermark;
tests cover the count, read-one, read-all and the security filter.
Landed on release/0.6 with feature train #5221 (merged by rebase on 2026-10-31 at 20:26:51 UTC) as commit 9db7a44 (perf(platform): read the bell from a per-user watermark). It ships with Tale 0.6.0. GitHub closes issues only for commits on main, so the feature-train role closes this one. Task: TALE-253.
Activity
test(platform): probe the bell's read watermark on a real database
docs(platform): name the bell spec's example people, not pronouns
perf(platform): read the bell from a per-user watermark
test(platform): probe the bell's read watermark on a real database
docs(platform): name the bell spec's example people, not pronouns
perf(platform): number the bell's watermark migration 0228
docs(platform): say which read rows the bell's Read all drops
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
tale-code-bot commentedon Oct 31, 2026
Landed on
release/0.6with feature train #5221 (merged by rebase on 2026-10-31 at 20:26:51 UTC) as commit 9db7a44 (perf(platform): read the bell from a per-user watermark). It ships with Tale 0.6.0. GitHub closes issues only for commits onmain, so the feature-train role closes this one. Task: TALE-253.perf(platform): read the bell from a per-user watermark
4 remaining items
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark
perf(platform): read the bell from a per-user watermark