brackt/app/routes
Claude 1e215c3ac9
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 3m14s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m18s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Fix three defects found reviewing the bracket entry-floor work
All three predate the EV fix on this branch and were surfaced by a review
of the full main..HEAD range.

1. reprocess-bracket skipped its wipe exactly when it was needed.

   The wipe was guarded on `completed.length > 0`, but clear-bracket
   deliberately leaves placements alone and tells the admin to "Run
   Reprocess Bracket after rebuilding to clear the placements those
   results produced". After clear then regenerate nothing is completed,
   so the wipe was skipped and the discarded bracket's finalized
   placements survived — and upsertParticipantResult's never-un-finalize
   guard then stopped the entry floors and the replay from correcting
   them. The advertised recovery path could not work.

   The guard was not arbitrary: seasonParticipantResults is keyed by
   sports season, not by event, so a season-wide delete takes every
   other event's placements with it. Rather than flip the condition,
   narrow the delete. New deleteParticipantResultsForParticipants scopes
   it to the participants the bracket actually holds, which removes the
   collateral damage the guard was defending against, so the delete can
   run unconditionally. The participant set was already being computed
   further down for the elimination pass; it is now built once and
   reused. The qualifying branch keeps its season-wide delete, which is
   deliberate and rebuilds via finalizeQualifyingPoints.

2. Banked entry floors could miss teamStandings.totalPoints.

   generate-bracket recalculated standings only when `toEliminate` was
   empty, assuming markEliminatedAndAnnounce covers every other case. It
   does not — it recalculates only when the event is non-qualifying AND
   somebody was *newly* eliminated, i.e. had no prior result row. So the
   second run of a generation (the first wrote 0 for every non-bracket
   participant) recalculated nowhere, and neither did a qualifying event
   with teams to eliminate. The floors never reached the standings.

   markEliminatedAndAnnounce now returns { markedCount, recalculated }
   and the caller drives off that fact instead of re-deriving it, which
   also covers the case where the announcement threw — the catch
   swallows the error, and a failed recalc is precisely when the
   fallback should run.

3. The NBA mobile pager fell back to index geometry.

   Its BracketTreePaginated was the only one of five call sites not
   forwarding feeders/template, so mobile rendered "TBD" where desktop
   rendered "Winner of ...".

Tests: reprocess wipes on a bracket with nothing played, stays scoped to
the bracket, dedupes and skips empty slots, and leaves the qualifying
path alone; generate recalculates in each of the four gaps above and
still does not double-recalculate; and the NBA layout gives its mobile
pane the same slot labels as desktop. Each was confirmed to fail against
the previous behavior.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EmUdy42Rpgx9qZTnpQwirz
2026-08-27 17:26:23 +00:00
..
__tests__ Fix three defects found reviewing the bracket entry-floor work 2026-08-27 17:26:23 +00:00
admin Auto-populate & auto-score tennis Grand Slam brackets from Wikipedia 2026-06-26 21:48:00 -07:00
api Fix three timer-pause gaps found in code review 2026-06-06 08:52:04 -07:00
leagues claude/wimbledon-qp-scoring-bug-xevhlf (#127) 2026-07-03 21:40:11 +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.draft-schedule.tsx Address code-review findings on draft schedule Gantt 2026-07-02 02:33:15 +00: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 Centralize futures odds onto the simulator page and fix bulk import (#117) 2026-06-30 17:05:52 +00: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.helpers.ts Announce mirror knockouts from the admin bracket-scoring path too 2026-07-04 18:19:52 +00:00
admin.sports-seasons.$id.events.$eventId.bracket.server.ts Fix three defects found reviewing the bracket entry-floor work 2026-08-27 17:26:23 +00:00
admin.sports-seasons.$id.events.$eventId.bracket.tsx Only derive feeders where the halving rule actually holds 2026-08-21 18:18:05 +00:00
admin.sports-seasons.$id.events.$eventId.cs2-setup.tsx Unify majors: score once, fan out across windows + tennis bracket EV 2026-06-22 20:32:22 -07: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 Unify majors: score once, fan out across windows + tennis bracket EV 2026-06-22 20:32:22 -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 Fix Docker build failure caused by server-only import reaching client bundle 2026-07-01 22:36:25 +00:00
admin.sports-seasons.$id.events.server.ts claude/wimbledon-qp-scoring-bug-xevhlf (#127) 2026-07-03 21:40:11 +00:00
admin.sports-seasons.$id.events.tsx Improve shared-tournament/event management UX 2026-07-02 05:17:37 +00:00
admin.sports-seasons.$id.expected-values.server.ts Fix EV reporting 20 pts for both LLWS 5-6 and 7-8 locked tiers 2026-08-27 16:11:59 +00:00
admin.sports-seasons.$id.expected-values.tsx Fix EV reporting 20 pts for both LLWS 5-6 and 7-8 locked tiers 2026-08-27 16:11:59 +00:00
admin.sports-seasons.$id.futures-odds.tsx Centralize futures odds onto the simulator page and fix bulk import (#117) 2026-06-30 17:05:52 +00:00
admin.sports-seasons.$id.golf-skills.tsx Fix EV reporting 20 pts for both LLWS 5-6 and 7-8 locked tiers 2026-08-27 16:11:59 +00: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 Paginate and sport-tailor the simulator setup participant table (#132) 2026-07-07 06:00:15 +00: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 Fix EV reporting 20 pts for both LLWS 5-6 and 7-8 locked tiers 2026-08-27 16:11:59 +00:00
admin.sports-seasons.$id.tsx Centralize futures odds onto the simulator page and fix bulk import (#117) 2026-06-30 17:05:52 +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 Improve shared-tournament/event management UX 2026-07-02 05:17:37 +00:00
admin.tournaments._index.tsx Canonical tournament layer: 2026-05-01 21:04:48 -07:00
admin.tsx Add admin draft schedule Gantt chart 2026-07-02 00:44:23 +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 claude/settings-menu-urls-kbp6x8 (#116) 2026-06-30 16:01:36 +00: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