brackt/app/routes
Chris Parsons 6f5ea35952
Add NHL playoff simulator and fix simulator dropdown (#166)
Closes #115

- Add `NHLSimulator` using NHL's divisional bracket format (top 3 per
  division + 2 wildcards per conference, best-of-7 series, parity
  factor 800). Elo ratings and seeding probabilities sourced from
  elo.harvitronix.com/nhl/2025-2026 as of March 18, 2026.
- Add `nhl_bracket` to `simulatorTypeEnum` with migration.
- Register `NHLSimulator` in the simulator registry.
- Fix simulator type dropdown in admin to auto-generate from the
  registry instead of a hardcoded list, so new simulators appear
  automatically without a separate UI change.

Code review fixes applied to the simulator:
- Narrow `weightedPick` key type to the five seeding probability fields
  (was `keyof NhlTeamData`, allowing `"elo"` which would silently
  corrupt results)
- Remove uniform-random fallback in `weightedPick` — zero-weight draws
  now return `undefined` and are skipped, preventing eliminated teams
  from becoming wildcards
- Exclude unrecognized participants entirely (with a console warning)
  instead of silently routing them into the Eastern wildcard pool
- Replace the confusing for-of loop over both conferences (with unused
  `champ` variable and `!`-suppressed unitialized vars) with two
  explicit sequential East/West blocks
- Track `effectiveN` for skipped degenerate draws so probability
  denominators stay accurate; throw if all iterations are skipped

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 01:23:53 -07:00
..
api Grant sitewide admins commissioner-level access in leagues (#162) 2026-03-18 00:41:56 -07:00
leagues Auto-name teams on claim and harden owner-assignment logic (#163) 2026-03-18 00:53:40 -07:00
teams feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin._index.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.data-sync.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.participants.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.sports-seasons.$id.events.$eventId.bracket.server.ts Fix partial bracket scoring, rank labels, and Discord notification bugs (#158) 2026-03-17 12:34:10 -07:00
admin.sports-seasons.$id.events.$eventId.bracket.tsx Fix partial bracket scoring, rank labels, and Discord notification bugs (#158) 2026-03-17 12:34:10 -07:00
admin.sports-seasons.$id.events.$eventId.server.ts Add event_starts_at timestamp to scoring events for sub-day ordering (#146) 2026-03-15 10:22:42 -07:00
admin.sports-seasons.$id.events.$eventId.tsx Fix event date timezone bugs (UTC rollover + same-day status) (#148) 2026-03-15 12:28:39 -07:00
admin.sports-seasons.$id.events.server.ts Add event_starts_at timestamp to scoring events for sub-day ordering (#146) 2026-03-15 10:22:42 -07:00
admin.sports-seasons.$id.events.tsx Fix event date timezone bugs (UTC rollover + same-day status) (#148) 2026-03-15 12:28:39 -07:00
admin.sports-seasons.$id.expected-values.server.ts Add NCAAM and NCAAW bracket Monte Carlo simulators (#150) 2026-03-15 23:31:47 -07:00
admin.sports-seasons.$id.expected-values.tsx Add NCAAM and NCAAW bracket Monte Carlo simulators (#150) 2026-03-15 23:31:47 -07:00
admin.sports-seasons.$id.futures-odds.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.sports-seasons.$id.participants.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.sports-seasons.$id.simulate.tsx Add NCAAM and NCAAW bracket Monte Carlo simulators (#150) 2026-03-15 23:31:47 -07:00
admin.sports-seasons.$id.standings.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.sports-seasons.$id.tsx Add Discord usernames, fix calculateTeamScore partial-score bug, and add admin re-score action (#160) 2026-03-17 14:34:09 -07:00
admin.sports-seasons.new.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.sports-seasons.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.sports.$id.tsx Add NHL playoff simulator and fix simulator dropdown (#166) 2026-03-18 01:23:53 -07:00
admin.sports.new.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.sports.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.standings-snapshots.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.templates.$id.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.templates.new.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.templates.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
admin.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -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 Add event_starts_at timestamp to scoring events for sub-day ordering (#146) 2026-03-15 10:22:42 -07: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 Auto-name teams on claim and harden owner-assignment logic (#163) 2026-03-18 00:53:40 -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 feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00
user-profile.tsx feat: add meta title to all route pages (#109) 2026-03-10 12:10:52 -07:00