brackt/app/routes/leagues
Claude 430526104c Unify tie-split point math across every screen
A participant tied for a scoring placement splits the combined points of
the tied positions. Four code paths computed a pick's points, each
re-implementing the same bracket/qualifying_points/default cascade, and
two of them omitted the qualifying_points arm entirely. A golfer tied for
8th was therefore worth the full 15 points on the team page and draft
board but the split 7.5 in the standings, so a team read 225 on one
screen and 218 on another.

Collapse the cascade into a single calculatePickPoints helper and route
all six call sites through it, backed by one shared getSharedPlacementCounts
loader replacing the two separate tie-count queries. Tie counts span every
participant in the sports season, not just drafted ones, since an
undrafted tie partner still halves the award.

Also round split awards to the nearest whole point in
calculateAveragedPoints. The /rules page states ties are "combined and
split equally among them, rounded to the nearest whole point", and its own
worked example rounds 18.33 down to 18, so this is nearest rather than
ceiling. Season point values are integer columns, making this averaging
the only source of fractional points; rounding here means the standings'
218 is now correct by construction rather than a display artifact, and
per-pick values visibly sum to the team total.

Existing assertions encoding the unrounded results are updated, and the
rules page's two published examples are asserted directly so the code and
the published rule cannot drift apart.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019LZLF1PAfeKdpYog3NKtyz
2026-08-23 01:57:54 +00:00
..
__tests__ Add Discord draft pick announcements (#460) 2026-05-20 19:55:48 -07:00
$leagueId.audit-log.tsx Migrate auth from Clerk to BetterAuth (#354) 2026-04-29 10:03:50 -07:00
$leagueId.draft-board.$seasonId.tsx Unify tie-split point math across every screen 2026-08-23 01:57:54 +00:00
$leagueId.draft-queue.$seasonId.tsx Rename queue page to Set Pre-Draft Queue, remove VORP, fix re-add race condition (#436) 2026-05-15 18:47:36 -07:00
$leagueId.draft.$seasonId.tsx Fix draft pause clock: use Math.ceil consistently via shared msToSeconds helper 2026-06-06 16:39:53 -07:00
$leagueId.server.ts Add projections to full standings; clean up change indicators 2026-06-21 11:56:15 -07:00
$leagueId.settings.server.ts Enforce unique team names within a season 2026-05-23 16:55:08 -07:00
$leagueId.settings.tsx Add Discord draft pick announcements (#460) 2026-05-20 19:55:48 -07:00
$leagueId.sports-seasons.$sportsSeasonId.events.$eventId.server.ts Show bracket on tennis Grand Slam major event pages (#113) 2026-06-28 04:35:40 +00:00
$leagueId.sports-seasons.$sportsSeasonId.events.$eventId.tsx Show bracket on tennis Grand Slam major event pages (#113) 2026-06-28 04:35:40 +00:00
$leagueId.sports-seasons.$sportsSeasonId.server.ts claude/wimbledon-qp-scoring-bug-xevhlf (#127) 2026-07-03 21:40:11 +00:00
$leagueId.sports-seasons.$sportsSeasonId.tsx claude/inspiring-turing-9w84hu (#94) 2026-06-17 04:29:23 +00:00
$leagueId.standings.$seasonId.teams.$teamId.tsx Fix draft order initialization for teams added mid-season (#449) 2026-05-19 18:22:47 -07:00
$leagueId.standings.$seasonId.tsx Add projections to full standings; clean up change indicators 2026-06-21 11:56:15 -07:00
$leagueId.tsx Add projections to full standings; clean up change indicators 2026-06-21 11:56:15 -07:00
$leagueId.upcoming-events.tsx claude/beautiful-hawking-a72ilq (#92) 2026-06-16 14:11:51 +00:00
creating.tsx Extract reusable league wizard components; wire settings page (#350) 2026-04-28 22:24:13 -07:00
new.tsx claude/sports-templates-conversion-ILWAM (#71) 2026-06-04 21:31:49 +00:00