brackt/app/components
Chris Parsons 469cc82e15
Add opt-in Discord pings to standings notifications (#429)
* Add opt-in Discord ping to standings notifications

Users who have linked their Discord account can enable a ping preference
in Settings > Notifications. When enabled, their bracket username is replaced
with a Discord @mention (<@userId>) in league standings update messages,
sending them a push notification and showing their Discord display name.

Adds discordPingEnabled column to users, a findDiscordIdsByUserIds model
helper, allowed_mentions support to the Discord webhook payload, and a
NotificationsSection settings component.

https://claude.ai/code/session_01NUv93WRrufHhpZSMyY4bjs

* Remove Display Name field from user profile settings

Username is the only user-facing name field. The display_name column
remains in the database since BetterAuth writes the OAuth provider name
there, and it serves as a programmatic fallback via getUserDisplayName.

https://claude.ai/code/session_01NUv93WRrufHhpZSMyY4bjs

* Address code review feedback on Discord ping feature

- Fix broken Account settings link in NotificationsSection: replace the
  non-functional ?section=account href with an onNavigateToAccount callback
  that drives the parent's useState-based section switcher
- Replace hand-rolled toggle button with the project's Switch component
  (Radix UI) for consistent sizing, accessibility, and dark-mode support
- Guard update-discord-ping action: return an error if the user attempts
  to enable pings without a Discord account linked
- Surface action error in NotificationsSection UI
- Cap allowed_mentions.users at 100 to avoid Discord rejecting the payload
  in large leagues
- Remove the showWinner alias in scoring-calculator; inline winnerScoreChanged
- Add comment to league settings test notification explaining why discordUserId
  is omitted
- Clarify database schema comment: displayName is write-only from BetterAuth

https://claude.ai/code/session_01NUv93WRrufHhpZSMyY4bjs

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-15 10:06:54 -07:00
..
__tests__ Add electric flash + fade animation for draft picks, fixes #381 (#407) 2026-05-10 23:17:29 -07:00
draft Add electric flash + fade animation for draft picks, fixes #381 (#407) 2026-05-10 23:17:29 -07:00
league Improve draft info panel formatting (#428) 2026-05-14 23:42:04 -07:00
marketing Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
scoring Fix standings table bugs and polish across all three scoring patterns (#415) 2026-05-12 10:39:25 -07:00
sport-season Fix standings table bugs and polish across all three scoring patterns (#415) 2026-05-12 10:39:25 -07:00
sports Add Cloudinary sports icon uploads (#393) 2026-05-07 16:07:34 -07:00
standings Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
ui Formalize simulator system with manifest, input-policy, runner, and admin UI (#409) 2026-05-11 21:09:53 -07:00
user/settings Add opt-in Discord pings to standings notifications (#429) 2026-05-15 10:06:54 -07:00
AutodraftSettings.tsx Add overnight pause for draft timers (#335) 2026-04-26 22:31:52 -07:00
BatchResultEntry.tsx Canonical tournament layer: 2026-05-01 21:04:48 -07:00
DraftGrid.tsx Fix mobile spacing for draft board and dashboard layout (#13, #329) (#404) 2026-05-10 19:51:34 -07:00
DraftSidebar.tsx New design (#309) 2026-04-23 13:14:55 -07:00
navbar.tsx Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
NavigationProgress.tsx Add NProgress navigation progress bar (#139) 2026-03-11 22:02:48 -07:00
NotificationSettings.tsx New design (#309) 2026-04-23 13:14:55 -07:00
ParticipantSelector.tsx feat: Add ParticipantSelector component for improved participant selection in brackets 2025-11-08 21:36:29 -08:00
SportIcon.tsx Add Cloudinary sports icon uploads (#393) 2026-05-07 16:07:34 -07:00
StandingsTable.tsx Show tied ranks with T prefix across standings and Discord (#239) 2026-03-27 20:45:15 -07:00
TeamAvatar.stories.tsx Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
TeamAvatar.tsx Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
UserMenu.tsx Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00