Skip to content

Per-sport notification settings; alerts only to their sport's app - #465

Merged
frizat82 merged 1 commit into
devfrom
feature/per-sport-notification-prefs
Oct 4, 2026
Merged

frizat82 merged 1 commit into
devfrom
feature/per-sport-notification-prefs

Conversation

@frizat82

@frizat82 frizat82 commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Owner's rules: each app (NFL host / CFB host) has its own notification settings, and notifications only go to the proper app for that sport.

  • NotificationPreferences is now one row per (user, sport), with a unique index on (UserId, Sport). The migration copies each existing row to CFB, so nobody's alerts change. Tested on local Postgres: the copy is correct and Down rolls back cleanly.
  • API: GET/PUT /api/notifications/preferences?sport=0|1. Each app's Notifications page reads and saves its own sport and says which app the settings apply to.
  • The dispatcher reads the settings for the alert's sport and sends only to that sport's app. This reverts Never drop a push for lack of a matching sport app #463's fallback.

Tests: service per-sport isolation, the controller sport param, dispatcher strict routing and per-sport settings, the page loading and saving its sport. Backend 1225 passed (plus the pre-existing live-ESPN failure), frontend 809, notification e2e specs pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DAWjtJgXaMYbzZXYJjTEYs

Owner: each app controls its own notification settings ("I may want NFL and not college"), and
notifications only go to the proper app for that sport. NotificationPreferences becomes one row
per (user, sport); migration copies existing rows to CFB so nobody's alerts change. The dispatcher
reads the alert sport's settings and sends only to that sport's app (reverts #463's fallback).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAWjtJgXaMYbzZXYJjTEYs
@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ivleague Ready Ready Preview Oct 4, 2026 8:48pm UTC

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

Backend Unit Test Results

✔️ Tests 1219 / 1219 - passed in 31.1s
✔️ Coverage 72.04% - passed with 30% threshold
📏 3031 / 4058 lines covered 🌿 1019 / 1564 branches covered
🔍 click here for more details

@frizat82
frizat82 merged commit 0398023 into dev Oct 4, 2026
8 checks passed
@frizat82
frizat82 deleted the feature/per-sport-notification-prefs branch October 4, 2026 20:54

This branch was successfully deployed

1 active deployment
Preview — 0fa5ca21 Deployed Oct 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant