feat: granular per-mode alert filters (v0.9.3)
Replace coarse milestone/referral suppression with 8 named action categories (vote, presidential, committee_report, calendar, procedural, referral, new_document, new_amendment), each independently togglable per follow mode (Follow / Pocket Veto / Pocket Boost). - notification_utils: categorize_action() replaces is_milestone_action / is_referral_action; _build_payload stores action_category in payload - congress_poller: use categorize_action() in _update_bill_if_changed - notification_dispatcher: _should_dispatch() checks per-mode filter dict from notification_prefs; follow mode looked up before filter check - schemas + api: alert_filters (nested dict) wired through settings GET/PUT endpoints; no DB migration required - frontend: tabbed Alert Filters section (Follow / Pocket Veto / Pocket Boost), each with independent 8-toggle filter set, milestone parent checkbox (indeterminate-aware), Load defaults button, and per-tab Save button Authored-By: Jack Levy
This commit is contained in:
@@ -182,6 +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;
|
||||
}
|
||||
|
||||
export interface Collection {
|
||||
|
||||
Reference in New Issue
Block a user