Add notification settings + telemetry feed (daemon-gated)#25
Conversation
New ffp_notifications module owns all notification policy: classify each toast by message pattern, then apply a master on/off, per-category toggles, a configurable dedupe window, Do-Not-Disturb, and quiet hours (errors/warnings always pass). Every decision is logged to data/notifications.jsonl and surfaced as a feed in the Telemetry tab. AHK Notify_Impl now consults the daemon (notify_gate) and fails OPEN when the daemon is unreachable, so the ~45 existing Notify() call sites are left untouched. Config gains a whitelisted `notifications` block; the dashboard Config tab gets a Notifications card and Telemetry gets the feed. Daemon actions: notify_gate (WRITE: decide+log), notifications_log (read). Tests: test_ffp_notifications (classify over every call-site message, gate policy, quiet-hours/dedupe, log read/write), config-patch whitelist tests, daemon action count 59 -> 61. Gates: ruff clean, 278 pytest passed, node --check app.js, AHK parse-check. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9df9116dac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| import ffp_config | ||
| import ffp_flm_server | ||
| import ffp_llm_client | ||
| import ffp_notifications |
There was a problem hiding this comment.
Include ffp_notifications in packaged modules
This new top-level import makes installed entry points depend on ffp_notifications, but the flat-module packaging list in pyproject.toml still omits ffp_notifications. In a wheel/installed build, scripts/ffp_notifications.py is not copied, so launching ffp-grammar-fix or anything importing grammar_fix raises ModuleNotFoundError before the app starts. Add the new module to the packaging/freeze module lists alongside the other ffp_* modules.
Useful? React with 👍 / 👎.
Notification settings + telemetry feed (daemon-gated)
Adds a Notifications card to Config and a notifications feed to Telemetry, delivering four capabilities the user requested:
data/notifications.jsonl, surfaced as a feed in the Telemetry tabDesign
All policy lives in the daemon (
ffp_notifications.py), which classifies each toast by message pattern, so the ~45 existingNotify()call sites are untouched. AHK'sNotify_Implconsults the daemon (notify_gate) and fails open (shows the toast) when the daemon is unreachable. The config-patch whitelist gains a guardednotificationsbranch; the dashboard is CSP-safe (createElement/textContent, no native dialogs).New daemon actions:
notify_gate(WRITE: decide + log),notifications_log(read).Tests
tests/test_ffp_notifications.py— classification over every real call-site message, gate policy (master/per-category/DND/quiet-hours/dedupe), log read/write, snapshot, drift guardsLocal gates: ruff clean · 278 pytest passed ·
node --check app.js· AHK parse-check exit 0.🤖 Generated with Claude Code