brackt/app/routes/__tests__
Claude 569081fe29
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m55s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m25s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Only derive feeders where the halving rule actually holds
Review caught that the generic feeder rule was being applied to templates
that route by their own logic. It was harmless as dead code; driving the
renderer with it made several brackets worse than before.

The rule pairs rounds by array order and assumes match n is fed by 2n-1
and 2n. That describes advanceWinnerTemplate, not every bracket:

- afl_10's Wildcard Round feeds the Elimination Finals, skipping the round
  listed next to it, so array order fabricated the entire chain and drew
  ten wrong connectors contradicting advanceAFLWinner.
- fifa_48's Third Place Game sits between the Semifinals and the Finals,
  so the Finals came out fed by the third place game. Once BracketTreeView
  filtered the consolation round out, the group had three roots and the
  whole World Cup bracket rendered with no connectors at all.
- ncaa_68 labelled Round of 64 #1/#2 with First Four feeds that
  advanceFirstFourWinner doesn't use.
- nba_20's play-in halves in size but pairs the 7v8 loser with the 9v10
  winner.

Follow each round's declared feedsInto, and derive edges only where the
round halves exactly — the condition under which the generic ceil(n/2)
mapping is true. Bespoke transitions that happen to halve are named
explicitly. Slots left without a feeder read TBD, which is honest.

Dropping those edges sends the group to the fallback, so the fallback now
has to keep drawing what those brackets already drew: halving U-shapes by
round size, and winner tracing through irregular shapes. Previously it
drew nothing, which also silently removed every connector from brackets
with no bracketTemplateId.

Also from review:
- clear-bracket deleted seasonParticipantResults for the entire sports
  season with no rebuild. That table is keyed by season, not event, so it
  wiped placements for every other event in the season — permanently
  zeroing standings on a finalized qualifying season. Delete only the
  matches and point the admin at Reprocess Bracket, which rebuilds
  placements correctly.
- The clear-bracket form sent confirm=true from a hidden field, making the
  server's completed-match guard unreachable. It's a checkbox now, so the
  guard is real, including without JS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HnzbrCHoM8ESbtbDamaqFb
2026-08-21 18:18:05 +00:00
..
admin.simulators.test.ts Hide completed seasons in admin tools (#418) 2026-05-12 16:52:26 -07:00
admin.sports-seasons.$id.test.ts Remove flaky context menu click tests (#81) 2026-06-10 05:59:49 +00:00
admin.sports-seasons.bracket.clear.test.ts Only derive feeders where the halving rule actually holds 2026-08-21 18:18:05 +00:00
admin.sports-seasons.bracket.helpers.test.ts Announce mirror knockouts from the admin bracket-scoring path too 2026-07-04 18:19:52 +00:00
admin.sports-seasons.helpers.test.ts Hide completed seasons in admin tools (#418) 2026-05-12 16:52:26 -07:00
admin.sports.$id.test.ts Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
admin.sports.new.test.ts Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
admin.tournaments.$id.test.tsx Canonical tournament layer: 2026-05-01 21:04:48 -07:00
api.upload-sport-icon.test.ts Add Cloudinary sports icon uploads (#393) 2026-05-07 16:07:34 -07:00
api.webhooks.cloudinary.test.ts Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
batch-results-helpers.test.ts feat: batch qualifying results entry (#290) 2026-04-12 14:52:22 -07:00
check-email.test.ts Add email verification for email/password signups (#400) 2026-05-09 23:58:45 -07:00
onboarding.test.ts Add user onboarding flow with username selection (#430) 2026-05-15 11:17:15 -07:00
root.onboarding-exempt.test.ts Add admin user management interface with search and username editing (#431) 2026-05-15 12:07:51 -07:00
settings.test.ts claude/settings-menu-urls-kbp6x8 (#116) 2026-06-30 16:01:36 +00:00
sports.test.tsx sync racing standings (#80) 2026-06-10 04:25:48 +00:00