brackt/app/routes
Chris Parsons cf8ac8a765
feat: progressive floor scoring for playoff brackets (#100)
When a participant wins a bracket round, they immediately earn provisional
"floor" points (the averaged minimum they'd receive if eliminated next round).
These update as they advance and are replaced by finalized scores on elimination.

Key changes:
- Add `is_partial_score` column to `participant_results` (migration 0038)
- `processPlayoffEvent`: assign provisional position 5 to non-scoring round
  winners; assign round-appropriate floors to scoring round winners via
  `getGuaranteedMinimumPosition`; add catch-all for unrecognized round names
- `upsertParticipantResult`: guard against un-finalizing rows (never overwrite
  isPartialScore=false with true)
- `calculateBracketPoints`: new function averaging tied bracket tiers
  (5-8 → 20 pts, 3-4 → avg, 1-2 solo); used in `calculateTeamScore` for
  playoff_bracket pattern (pattern-aware, doesn't affect F1/golf scoring)
- `PlayoffBracket`: "In Contention" table for still-active participants;
  AFL double-chance fix (participants who won a later match excluded from
  earlier round's loser list); correct `nextRank` starting position
- Server loader: batch owner DB queries (one query vs N+1); deduplicate
  participantPoints; use calculateBracketPoints for bracket point display
- Clean up Phase/Q-number tracking comments throughout scoring-calculator.ts
- 3 new tests for non-scoring round provisional floor behavior

Also includes a dev admin bypass via DEV_ADMIN_CLERK_ID env var (separate
change on this branch, not part of floor scoring feature).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 10:27:58 -07:00
..
api feat: implement real-time queue updates via socket events in queue actions (#63) 2026-03-04 21:39:54 -08:00
leagues feat: progressive floor scoring for playoff brackets (#100) 2026-03-10 10:27:58 -07:00
teams feat: add random team name generation and improve league exit flow 2025-10-14 22:45:24 -07:00
admin._index.tsx feat: implement daily standings snapshot system with admin management interface 2025-11-14 09:15:58 -08:00
admin.data-sync.tsx Add Zod validation and expand export/import for EV and results data (#14) 2026-02-20 20:25:25 -08:00
admin.participants.tsx feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
admin.sports-seasons.$id.events.$eventId.bracket.server.ts feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
admin.sports-seasons.$id.events.$eventId.bracket.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.events.$eventId.server.ts feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
admin.sports-seasons.$id.events.$eventId.tsx refactor: fix event edit page code review issues (#87) 2026-03-07 23:43:24 -08:00
admin.sports-seasons.$id.events.server.ts feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
admin.sports-seasons.$id.events.tsx feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
admin.sports-seasons.$id.expected-values.server.ts Refactor expected values form to batch save all participants (#4) 2026-02-19 15:57:05 -08:00
admin.sports-seasons.$id.expected-values.tsx User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
admin.sports-seasons.$id.futures-odds.tsx User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
admin.sports-seasons.$id.participants.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.simulate.tsx User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
admin.sports-seasons.$id.standings.tsx feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
admin.sports-seasons.$id.tsx User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
admin.sports-seasons.new.tsx feat: highlight owned participants in standings and fix schedule event badges (#83) 2026-03-07 21:59:29 -08:00
admin.sports-seasons.tsx feat: add bulk participant creation and expected value field 2025-10-15 21:21:33 -07:00
admin.sports.$id.tsx User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
admin.sports.new.tsx feat: add icon support for sports with file upload and active seasons display 2025-10-13 10:30:47 -07:00
admin.sports.tsx feat: add icon support for sports with file upload and active seasons display 2025-10-13 10:30:47 -07:00
admin.standings-snapshots.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.templates.$id.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.templates.new.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.templates.tsx feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
admin.tsx feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
api.admin.export-sports-data.ts feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
home.tsx Include commissioner leagues in user's active leagues (#8) 2026-02-20 10:28:37 -08:00
how-to-play.tsx Add rules page, rewrite how-to-play, and fix scoring display (#20) 2026-02-21 21:58:51 -08:00
i.$inviteCode.tsx feat: add invite code system for league seasons with member access control 2025-10-14 12:20:36 -07:00
rules.tsx Add rules page, rewrite how-to-play, and fix scoring display (#20) 2026-02-21 21:58:51 -08:00
test-socket.tsx fix: eliminate socket ghost connection and stale state on reconnect (#38) 2026-02-24 12:24:04 -08:00
user-profile.tsx feat: add user model, routes, and Clerk webhook integration 2025-10-11 00:53:39 -07:00