KB-7FBA
P3D — Notification Outbox + Read State — Design Anchor
1 min read Revision 1
p3ddesignnotificationoutboxread-state
P3D — Notification Outbox + Read State — Design Anchor
Date: 2026-05-07 Status: DESIGN ANCHOR — chưa implementation.
Nguyên tắc
- PG-first / PG-native / PG-driven
- Lightweight event lists, KHÔNG general activity log
- PG triggers on: comment insert, draft create, apply/update
- Tách 2 loại event: comment events + official update/apply events
Per-actor read state
- Mỗi reviewer/actor có trạng thái đã xem riêng
- GPT mark seen → chỉ ẩn với GPT
- Opus chưa seen → vẫn hiện với Opus
- Query unread items của chính mình
- Không global read flag
Implementation
- Deferred to P3D
- Cần: notification table(s), per-actor read_state table, PG triggers
- Tận dụng PG LISTEN/NOTIFY nếu phù hợp