feat: Discovery alert filters + notification reasons (v0.9.6)

- Add 4th "Discovery" tab in Alert Filters for member/topic follow notifications,
  with per-source enable toggle, independent event-type filters, and per-entity
  mute chips (mute specific members/topics without unfollowing)
- Enrich notification event payloads with follow_mode, matched_member_name,
  matched_member_id, and matched_topic so each event knows why it was created
- Dispatcher branches on payload.source for member_follow/topic_follow events,
  checking source-level enabled toggle, per-event-type filters, and muted_ids/muted_tags
- Add _build_reason helper; ntfy messages append a "why" line (📌/👤/🏷)
- EventRow in notification history shows a small italic reason line
- Update How It Works: fix stale member/topic paragraph, add Discovery alerts item

Authored-by: Jack Levy
This commit is contained in:
Jack Levy
2026-03-14 13:21:22 -04:00
parent 91473e6464
commit 247a874c8d
5 changed files with 281 additions and 15 deletions

View File

@@ -182,7 +182,7 @@ export interface NotificationSettings {
quiet_hours_start: number | null;
quiet_hours_end: number | null;
timezone: string | null; // IANA name, e.g. "America/New_York"
alert_filters: Record<string, Record<string, boolean>> | null;
alert_filters: Record<string, Record<string, boolean | string[]>> | null;
}
export interface Collection {