brackt/app
Chris Parsons 7236c8aefb
Add Discord usernames, fix calculateTeamScore partial-score bug, and add admin re-score action (#160)
**Discord webhook improvements**
- Show team owner username in parentheses in standings (e.g. "1. Alpha FC (christhrowsrocks) — 150 pts")
- Show username in parentheses in match results for drafted participants
  (e.g. "Sporting (christhrowsrocks) def. Bodø/Glimt (apatel)"), omitting
  the parenthesis for the undrafted side
- Username lookup only runs after the webhook URL guard to avoid wasted DB queries
- 4 new tests covering all username display combinations

**Fix calculateTeamScore partial-score counting bug**
- isPartialScore participants were incorrectly counted in participantsCompleted
  and placementCounts, causing standings to show wrong remaining count and
  phantom placement badges (e.g. "5th×1") for still-alive bracket participants
- Floor points still flow into totalPoints (guaranteed value for ranking)
- 3 new unit tests covering partial vs finalized behavior in calculateTeamScore

**Admin Force Re-score action**
- New "Fantasy Standings" card on every sports season admin page with a
  Force Re-score button that triggers recalculateStandings on all linked
  fantasy seasons — useful after data corrections without waiting for a
  new scoring event
- Auth guard added to the action (was missing — layout loader only protects GET)
- Returns a meaningful message when no linked seasons exist
- Intent discriminant on action returns so success banners use actionData.intent
  instead of fragile message.includes() checks

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 14:34:09 -07:00
..
components Fix bracket point averaging and partial-score display in standings/breakdown (#159) 2026-03-17 14:00:32 -07:00
contexts feat: implement middleware and context provider for Express integration 2025-10-11 20:56:00 -07:00
hooks perf: fix draft room lag from excessive re-renders and listener leaks (#54) 2026-03-02 13:18:47 -08:00
lib Fix First Four appearing out of order in NCAA bracket display (#152) 2026-03-16 12:27:43 -07:00
models Add Discord usernames, fix calculateTeamScore partial-score bug, and add admin re-score action (#160) 2026-03-17 14:34:09 -07:00
routes Add Discord usernames, fix calculateTeamScore partial-score bug, and add admin re-score action (#160) 2026-03-17 14:34:09 -07:00
services Add Discord usernames, fix calculateTeamScore partial-score bug, and add admin re-score action (#160) 2026-03-17 14:34:09 -07:00
test feat: Add comprehensive scoring system database schema 2025-10-28 23:40:11 -07:00
types feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
utils Add Zod validation and expand export/import for EV and results data (#14) 2026-02-20 20:25:25 -08:00
welcome Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
app.css Add NProgress navigation progress bar (#139) 2026-03-11 22:02:48 -07:00
entry.client.tsx Filter unnecessary sentry css and js errors. 2026-03-15 10:24:57 -07:00
entry.server.tsx feat: add Sentry error monitoring (#132) 2026-03-10 23:35:33 -07:00
root.tsx Add NProgress navigation progress bar (#139) 2026-03-11 22:02:48 -07:00
routes.ts User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00