Submatter/plans/Plan-workspace-communications/Epic-unified-notifications/Task-notification-inbox-foundation.md

1.6 KiB

kind slug title plan_slug epic_slug status priority tenant_id owner cursor_todo_id updated_at
task notification-inbox-foundation Build notification persistence and inbox API workspace-communications unified-notifications ready P1 global unassigned null 2026-09-25

Task summary

Create the durable, recipient-scoped notification substrate and query/mutation API for a unified inbox.

Description

Add notifications and delivery-attempt tables with polymorphic source/target metadata and safe deep links. Preserve domain state in its originating tables; notifications are projections for a recipient. Add workspace-scoped procedures for pagination, unread counts, mark-read, mark-all-read, and archive.

Subtasks

  • Add notifications and notification_deliveries schemas and generated migration.
  • Define validated categories, actor/source/target contracts, and deduplication keys.
  • Add recipient-scoped inbox procedures and indexes for unread queries.
  • Add isolation, deduplication, and concurrent mark-read tests.

Owner or assignee

unassigned

Status

ready

Estimation

M

Acceptance criteria

  • Each notification belongs to one workspace and recipient.
  • Duplicate source events cannot create duplicate recipient notifications.
  • Read/archive operations are idempotent and safe across devices.
  • Deep links are generated from typed internal targets, not arbitrary untrusted URLs.
  • pnpm lint && pnpm type-check && pnpm test pass.
  • Epic: ./Epic-unified-notifications.md
  • Plan: ../Plan-workspace-communications.md