brackt/app/routes
Claude 50f2f93b0b
Award progressive guaranteed-minimum QP for qualifying-event brackets
Winning a round in a major bracket (CS2 Champions Stage) now immediately
awards the team the guaranteed-minimum qualifying points for the position
they've locked in — e.g. a QF win guarantees at least a T3 finish (9 QP),
an SF win guarantees 2nd (14 QP), and a Final win earns 1st (20 QP).

This also fixes a bug where CS2 majors (a qualifying_points sport) wrongly
banked actual fantasy points: the generic bracket admin routed results
through processMatchResult/processPlayoffEvent, which write the fantasy
placement table (seasonParticipantResults). For qualifying sports, fantasy
points must come only from finalizeQualifyingPoints across all majors.

- scoring-calculator.ts: add deriveBracketQualifyingStates (pure) and
  processQualifyingBracketEvent, deriving each team's (placement, tieCount)
  floor from playoffMatches via the existing ROUND_CONFIG and writing QP to
  event_results. Export getRoundConfig for testing.
- bracket.server.ts: branch all five write handlers on isQualifyingEvent so
  qualifying brackets are scored via the QP path and never write fantasy
  placements. reprocess-bracket additionally clears stale
  seasonParticipantResults rows, making it the cleanup tool for majors that
  already banked points under the old path.
- Add qualifying-bracket-scoring.test.ts covering the floor derivation,
  partial/un-set brackets, idempotency, and the worked QP example.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QVLqaYGXCeSYYqTHZmbRZi
2026-06-18 20:23:37 +00:00
..
__tests__ Remove flaky context menu click tests (#81) 2026-06-10 05:59:49 +00:00
admin claude/great-lovelace-r3bznh (#88) 2026-06-12 22:35:35 +00:00
api Fix three timer-pause gaps found in code review 2026-06-06 08:52:04 -07:00
leagues claude/inspiring-turing-9w84hu (#94) 2026-06-17 04:29:23 +00:00
teams Enforce unique team names within a season 2026-05-23 16:55:08 -07:00
admin._index.tsx admin fixes (#85) 2026-06-11 00:32:22 +00:00
admin.data-sync.tsx Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
admin.leagues.tsx admin fixes (#85) 2026-06-11 00:32:22 +00:00
admin.participants.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.simulators.tsx Hide completed seasons in admin tools (#418) 2026-05-12 16:52:26 -07:00
admin.sports-seasons.$id.clone.tsx Formalize simulator system with manifest, input-policy, runner, and admin UI (#409) 2026-05-11 21:09:53 -07:00
admin.sports-seasons.$id.elo-ratings.tsx Fix EPL simulator parity config (#421) 2026-05-13 15:02:23 -07:00
admin.sports-seasons.$id.events.$eventId.bracket.server.ts Award progressive guaranteed-minimum QP for qualifying-event brackets 2026-06-18 20:23:37 +00:00
admin.sports-seasons.$id.events.$eventId.bracket.tsx claude/practical-newton-4v041g (#98) 2026-06-18 02:33:05 +00:00
admin.sports-seasons.$id.events.$eventId.cs2-setup.tsx Fix CS2 Stage 3 QP slot assignment (#89) 2026-06-14 05:49:06 +00:00
admin.sports-seasons.$id.events.$eventId.helpers.ts feat: batch qualifying results entry (#290) 2026-04-12 14:52:22 -07:00
admin.sports-seasons.$id.events.$eventId.server.ts Add not-participating exclusion support for event results (#446) 2026-05-19 11:13:32 -07:00
admin.sports-seasons.$id.events.$eventId.swiss-matches.tsx claude/great-lovelace-r3bznh (#88) 2026-06-12 22:35:35 +00:00
admin.sports-seasons.$id.events.$eventId.tsx claude/funny-maxwell-vcyb19 (#91) 2026-06-15 22:05:25 +00:00
admin.sports-seasons.$id.events.server.ts Fix QP standings: filter to drafted/points-earning participants with correct global ranks 2026-06-06 09:38:47 -07:00
admin.sports-seasons.$id.events.tsx Remove sports_season_tournaments junction table — derive from scoring_events (#373) 2026-05-02 22:19:59 -07:00
admin.sports-seasons.$id.expected-values.server.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
admin.sports-seasons.$id.expected-values.tsx Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
admin.sports-seasons.$id.futures-odds.tsx Fix NCAAW futures odds simulation and admin import UX (#420) 2026-05-13 01:06:16 -07:00
admin.sports-seasons.$id.golf-skills.tsx Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
admin.sports-seasons.$id.participants.tsx Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
admin.sports-seasons.$id.regular-standings.tsx Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00
admin.sports-seasons.$id.simulate.tsx Fix simulate route crash and surface actual simulation errors (#64) 2026-06-01 06:47:30 +00:00
admin.sports-seasons.$id.simulator.tsx Upgrade NCAA preseason simulators (#419) 2026-05-12 22:26:25 -07:00
admin.sports-seasons.$id.standings.tsx Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
admin.sports-seasons.$id.surface-elo.tsx Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
admin.sports-seasons.$id.tsx claude/great-lovelace-r3bznh (#88) 2026-06-12 22:35:35 +00:00
admin.sports-seasons.helpers.ts Hide completed seasons in admin tools (#418) 2026-05-12 16:52:26 -07:00
admin.sports-seasons.new.tsx claude/great-lovelace-r3bznh (#88) 2026-06-12 22:35:35 +00:00
admin.sports-seasons.tsx Hide completed seasons in admin tools (#418) 2026-05-12 16:52:26 -07:00
admin.sports.$id.tsx Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
admin.sports.new.tsx Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
admin.sports.tsx Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
admin.standings-snapshots.tsx Replace console.* with structured logger, fix no-inferrable-types (closes #98) (#199) 2026-03-21 13:41:39 -07:00
admin.templates.$id.tsx claude/sports-templates-conversion-ILWAM (#71) 2026-06-04 21:31:49 +00:00
admin.templates.new.tsx claude/sports-templates-conversion-ILWAM (#71) 2026-06-04 21:31:49 +00:00
admin.templates.tsx claude/sports-templates-conversion-ILWAM (#71) 2026-06-04 21:31:49 +00:00
admin.tournaments.$id.tsx Remove sports_season_tournaments junction table — derive from scoring_events (#373) 2026-05-02 22:19:59 -07:00
admin.tournaments._index.tsx Canonical tournament layer: 2026-05-01 21:04:48 -07:00
admin.tsx Fix mobile admin nav bar hidden behind main navbar 2026-06-11 01:07:00 +00:00
admin.users.tsx Add admin user management interface with search and username editing (#431) 2026-05-15 12:07:51 -07:00
api.admin.export-sports-data.ts Migrate authentication from Clerk to BetterAuth (#324) 2026-04-24 22:00:49 -07:00
api.auth.$.ts Migrate authentication from Clerk to BetterAuth (#324) 2026-04-24 22:00:49 -07:00
api.upload-avatar.ts Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
api.upload-sport-icon.ts Add Cloudinary sports icon uploads (#393) 2026-05-07 16:07:34 -07:00
api.upload-team-logo.ts Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
api.webhooks.cloudinary.ts Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
check-email.tsx Add email verification for email/password signups (#400) 2026-05-09 23:58:45 -07:00
forgot-password.tsx fix: resolve all 48 WCAG 2.2 AA accessibility issues (#439) 2026-05-17 20:11:38 -07:00
healthz.ts Phase A: external HTTP cron jobs for snapshots, standings sync, and simulation (#79) 2026-06-08 07:42:14 +00:00
home.tsx claude/funny-maxwell-vcyb19 (#91) 2026-06-15 22:05:25 +00:00
how-to-play.tsx Add Brackt as a league-private meta-sport (#200) (#377) 2026-05-04 20:31:44 -07:00
i.$inviteCode.tsx Migrate auth from Clerk to BetterAuth (#354) 2026-04-29 10:03:50 -07:00
login.tsx fix: resolve all 48 WCAG 2.2 AA accessibility issues (#439) 2026-05-17 20:11:38 -07:00
onboarding.tsx fix: resolve all 48 WCAG 2.2 AA accessibility issues (#439) 2026-05-17 20:11:38 -07:00
privacy-policy.tsx New design (#309) 2026-04-23 13:14:55 -07:00
register.tsx fix: resolve all 48 WCAG 2.2 AA accessibility issues (#439) 2026-05-17 20:11:38 -07:00
reset-password.tsx fix: resolve all 48 WCAG 2.2 AA accessibility issues (#439) 2026-05-17 20:11:38 -07:00
rules.tsx Add Brackt as a league-private meta-sport (#200) (#377) 2026-05-04 20:31:44 -07:00
settings.tsx Add draft email notifications feature (#459) 2026-05-20 15:35:43 -07:00
sports-seasons.$sportsSeasonId.tournament.tsx claude/great-lovelace-r3bznh (#88) 2026-06-12 22:35:35 +00:00
sports.tsx Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
support.tsx Add branded dark-themed HTML email template (#402) 2026-05-10 11:18:57 -07:00
test-socket.tsx Replace console.* with structured logger, fix no-inferrable-types (closes #98) (#199) 2026-03-21 13:41:39 -07:00
upcoming-events.tsx claude/beautiful-hawking-a72ilq (#92) 2026-06-16 14:11:51 +00:00
user-profile-redirect.tsx Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00