brackt/app/components
Chris Parsons fbcecb490e
Add Discord draft pick announcements (#460)
* Add Discord draft pick announcements

Posts a message to the league Discord webhook each time a pick is made, announcing the picked participant and pinging the next team on the clock if their owner has opted into Discord notifications. Enabled via a separate toggle in league settings (independent from standings update notifications).

https://claude.ai/code/session_01Tvwsv3LfL9JUqxoLct8dTn

* Address code review feedback on Discord pick announcements

- Fix "on the clock" timing: read currentPickNumber fresh from DB post-autodraft-chain (matches sendOnTheClockEmail guarantee)
- Remove outer try/catch from notifyPickMadeOnDiscord so callers' .catch() is not dead code
- Add missing draft-discord.server.test.ts with 12 tests covering all early-exit and happy paths
- Fix silent empty-string fallback for missing pickedSlot: warn and skip instead
- Eliminate sequential season→league DB queries by accepting leagueId as a direct param
- Show "save webhook URL to configure options" hint when URL is typed but not yet saved
- Remove block-scope braces at both call sites (plain const declarations)
- Remove redundant "Round N, Pick M" description line (title already carries this info)
- Inline pickInRoundFor helper to avoid circular import with draft-utils

https://claude.ai/code/session_01Tvwsv3LfL9JUqxoLct8dTn

* Fix lint errors from review fixes

- Remove unused logger import (no longer needed after removing try/catch)
- Remove unused OWNER_ID constant in test fixture
- Use toSorted() instead of sort() in sendDraftOrderNotification

https://claude.ai/code/session_01Tvwsv3LfL9JUqxoLct8dTn

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-20 19:55:48 -07:00
..
__tests__ Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
draft Fix draft Summary tab showing wrong avatar for teams without custom logos (#453) 2026-05-20 00:02:19 -07:00
league Add Discord draft pick announcements (#460) 2026-05-20 19:55:48 -07:00
marketing Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
scoring Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -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 Add draft email notifications feature (#459) 2026-05-20 15:35:43 -07:00
user/settings Add draft email notifications feature (#459) 2026-05-20 15:35:43 -07:00
AutodraftSettings.tsx fix: resolve all 48 WCAG 2.2 AA accessibility issues (#439) 2026-05-17 20:11:38 -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 public sports overview page (#451) 2026-05-19 23:02:58 -07:00
NavigationProgress.tsx Add NProgress navigation progress bar (#139) 2026-03-11 22:02:48 -07:00
NotificationSettings.tsx Add draft email notifications feature (#459) 2026-05-20 15:35:43 -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 fix: resolve all 48 WCAG 2.2 AA accessibility issues (#439) 2026-05-17 20:11:38 -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 fix: resolve all 48 WCAG 2.2 AA accessibility issues (#439) 2026-05-17 20:11:38 -07:00