Submatter/plans/Plan-workspace-communications/Epic-unified-notifications/Task-notification-producers-and-preferences.md

56 lines
2 KiB
Markdown
Raw Normal View History

---
kind: task
slug: notification-producers-and-preferences
title: Connect notification producers, preferences, inbox, and badges
plan_slug: workspace-communications
epic_slug: unified-notifications
status: ready
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-10-22"
---
# Task summary
Build the inbox UI and map chat and operational events into preference-aware notifications and badges.
## Description
Add notification preferences by category and channel, then produce notifications for chat mentions/replies/direct messages, task assignments, human gates, and agent outcomes. Present one global inbox while retaining a chat-specific badge in the left rail. Existing gate inbox state remains authoritative and is projected into notifications.
## Subtasks
- [ ] Add `notification_preferences` schema, defaults, and update procedures.
- [ ] Add outbox consumers that map domain events to recipient notifications.
- [ ] Build `/[workspaceSlug]/inbox` with filters, grouping, deep links, and bulk read/archive.
- [ ] Add global and Chat rail badges backed by durable unread counts.
## Owner or assignee
`unassigned`
## Status
`ready`
## Estimation
`L`
## Acceptance criteria
- [ ] Recipient production, inbox previews, deep links and unread counts apply current workspace AND context AND channel permissions; membership/ACL revocation hides inaccessible content and stops delivery without leaking private-context titles.
- [ ] Mention, reply, assignment, gate, and agent-result events create correct recipient notifications.
- [ ] Preference changes affect future delivery without deleting inbox history.
- [ ] Rail badges converge to server truth after reconnect and multi-device reads.
- [ ] Existing convoy/gate workflows remain functional and are not duplicated as domain records.
- [ ] `pnpm lint && pnpm type-check && pnpm test` pass.
## Links to related Epic / Plan
- Epic: `./Epic-unified-notifications.md`
- Plan: `../Plan-workspace-communications.md`