Commit Graph

2 Commits

Author SHA1 Message Date
Jiayuan
45e1dfd325 feat(inbox): add notification preferences settings
Add per-type notification preference controls to the Inbox, allowing
users to toggle which notification types they receive. This addresses
the core pain point of agent-generated status change noise flooding
user inboxes.

Backend:
- New `notification_preference` table (migration 064) with per-user,
  per-workspace, per-type enabled/disabled toggle
- GET/PUT /api/inbox/preferences endpoints for CRUD
- notification_listeners.go checks user preferences before creating
  inbox items, using preloaded per-type batch queries for efficiency
- status_changed notifications default to OFF; all others default ON

Frontend:
- NotificationPreference type and API client methods
- TanStack Query options + optimistic mutation hook
- Settings dialog accessible via gear icon in Inbox header
- Grouped by category: Status, Comments, Assignments, Mentions,
  Priority, Due dates, Reactions, Agent events, Quick create
- Each category shows icon, label, description, and Switch toggle
2026-04-29 21:10:00 +02:00
Jiayuan
afdfee78b9 feat(daemon): add authentication for daemon API routes
Issue daemon auth tokens (mdt_) on pairing session claim, bound to
workspace_id + daemon_id with 1-year expiry. Add DaemonAuth middleware
that validates these tokens and falls back to JWT/PAT for backward
compatibility. Apply middleware to all daemon routes except pairing
endpoints.
2026-03-31 16:19:02 +08:00