brackt/app/components/scoring
Claude 999f70c4eb
feat: add match sync service, cron job, public tournament display (Phases 2-4)
Phase 2 — Match Sync Adapters + Cron Job:
- PandaScoreMatchSyncAdapter (CS2): fetches matches with map-level sub-games, stage detection
- EspnScheduleAdapter (MLB/NBA/MLS/WNBA/NHL): fetches scoreboard with live scores
- syncMatches() orchestrator: resolves participants by externalId+name, bulk-upserts season_matches, syncs playoff bracket results through existing setMatchWinner/processMatchResult pipeline
- POST /admin/jobs/sync-matches cron endpoint (mirrors sync-and-simulate pattern)
- External Season ID field added to sports season create/edit admin forms
- Sync from API button wired in CS2 setup page (enabled when externalSeasonId set)

Phase 3 — Public Tournament & Schedule Display:
- MatchSchedule component: generic match list with live/scheduled/complete status badges, matchday grouping
- Cs2TournamentBracket component: tab layout (Opening/Challengers/Legends/Champions Stage), map scores per match
- /sports-seasons/:sportsSeasonId/tournament public route with 30-second live polling

Phase 4 — Playoff Bracket Auto-Sync:
- externalMatchId column added to playoff_matches table (migration 0121)
- Bracket matches (matchStage=null) auto-synced: matches existing playoff_match rows by externalMatchId then participant IDs, calls full scoring pipeline
- autoCompleteRoundIfDone extracted to scoring-calculator.ts for shared use

All 2365 tests pass; typecheck clean.

https://claude.ai/code/session_01WUUM7uWzFoSkGcZRhnEKG6
2026-06-12 20:46:30 +00:00
..
__tests__ Fix NBA play-in elimination display and consolidate bracket reprocessing (#299) 2026-04-15 14:56:33 -07:00
BracketTreePaginated.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
BracketTreeView.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
Cs2TournamentBracket.tsx feat: add match sync service, cron job, public tournament display (Phases 2-4) 2026-06-12 20:46:30 +00:00
GroupStageDisplay.tsx User/chris/bracket UI redesign (#95) 2026-03-09 22:44:33 -07:00
MatchSchedule.tsx feat: add match sync service, cron job, public tournament display (Phases 2-4) 2026-06-12 20:46:30 +00:00
NbaBracketLayout.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
PlayoffBracket.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
QualifyingPointsStandings.tsx Fix QP standings: filter to drafted/points-earning participants with correct global ranks 2026-06-06 09:38:47 -07:00
RankingsRow.stories.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
RankingsRow.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
ScoringRulesEditor.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
SeasonStandings.tsx Fix IndyCar standings: correct ESPN stat key, update title, restore finalized badge 2026-06-10 09:17:23 -07:00
SportSeasonDisplay.tsx Fix IndyCar standings: correct ESPN stat key, update title, restore finalized badge 2026-06-10 09:17:23 -07:00
TabbedBracketLayout.tsx Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00