sync racing standings #80

Merged
chrisp merged 6 commits from claude/gallant-bell-cuzqgx into main 2026-06-10 04:25:49 +00:00
Owner
No description provided.
chrisp added 1 commit 2026-06-09 19:03:57 +00:00
Add F1 and IndyCar standings auto-sync
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Failing after 43s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m22s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
9541318adf
Implements F1StandingsAdapter (Jolpica/Ergast API) and IndyCarStandingsAdapter
(ESPN IRL API), wires them into the syncStandings orchestrator with a
season_standings branch that upserts into participantSeasonResults instead of
regularSeasonStandings, and adds a "Championship Standings" card with a Sync
Standings button to the admin sports season page for individual sports.

https://claude.ai/code/session_012ACmUs2vAwEF9jZu7Guos2
chrisp added 2 commits 2026-06-09 19:15:06 +00:00
- Add unique constraint on participantSeasonResults(participantId, sportsSeasonId)
  and rewrite upsert to use onConflictDoUpdate, eliminating race conditions and
  sequential N*2 queries on sync
- Fetch pending mappings for all sport types; extend Unmatched card to show for
  individual sports and route resolve-mapping to participantSeasonResults for
  season_standings sports
- Replace hardcoded SEASON_STANDINGS_SIMULATOR_TYPES Set with
  sportsSeason.scoringPattern === "season_standings" to avoid drift
- Remove countCompletedRaces() from F1 adapter — gamesPlayed/winPct were computed
  but discarded by the orchestrator for season_standings sports
- Replace duplicate parseRacingStatsMap() with the shared statsMap() from espn.ts

https://claude.ai/code/session_012ACmUs2vAwEF9jZu7Guos2
Add Drizzle snapshot for migration 0119
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Failing after 2m37s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m21s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
da0e118886
https://claude.ai/code/session_012ACmUs2vAwEF9jZu7Guos2
chrisp added 1 commit 2026-06-09 22:00:07 +00:00
Fix AvailableParticipantsSection test: use fireEvent to avoid Radix UI timer hang
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Failing after 2m43s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m24s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
52277ab864
Replace async userEvent.click with fireEvent.click for the sport filter
dropdown test when hasTeam=true. The extra Checkbox components rendered in
that path stall userEvent's act() settlement loop inside Radix UI, causing
the test to hang. fireEvent bypasses the async machinery while still
exercising the open/close behavior.

https://claude.ai/code/session_012ACmUs2vAwEF9jZu7Guos2
chrisp added 1 commit 2026-06-09 23:15:05 +00:00
Fix sports.test.tsx timeout: replace img-rendering SportIcon mock with null stub
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Failing after 2m52s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m30s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
40e1ba22b8
The previous fix mocked SportIcon to render <img> elements. In jsdom, those
images fail to load and schedule async error callbacks that can stall React's
act() settlement loop when the full suite runs under load, causing the test to
hit the 5000ms timeout intermittently.

Replace the async mock factory with a trivial synchronous stub that returns
null — no images, no async events. resolveSportIconUrl URL resolution is
already covered by its own unit tests, so no coverage is lost.

https://claude.ai/code/session_012ACmUs2vAwEF9jZu7Guos2
chrisp added 1 commit 2026-06-10 04:20:51 +00:00
Fix flaky test timeouts: synchronous requestAnimationFrame in test setup
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m53s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m29s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
15097ddcf8
Radix UI and @floating-ui call requestAnimationFrame for layout/positioning
on every render — Popovers, DropdownMenus, Checkboxes, etc.  In jsdom those
callbacks are deferred outside the current act() boundary, leaving pending
state updates that keep the act() settlement loop running until Vitest's
5000ms hard timeout kills the test.  Under load (full suite) there is no
slack to absorb the deferral.

Overriding requestAnimationFrame/cancelAnimationFrame with synchronous
no-ops in the global test setup ensures every Radix UI callback completes
inside the current act() cycle.  This fixes the whole class of
Radix-UI-induced flaky timeouts without touching individual test files.

https://claude.ai/code/session_012ACmUs2vAwEF9jZu7Guos2
chrisp merged commit 0150fb7ab9 into main 2026-06-10 04:25:49 +00:00
chrisp referenced this pull request from a commit 2026-06-10 04:25:50 +00:00
chrisp deleted branch claude/gallant-bell-cuzqgx 2026-06-10 04:25:59 +00:00
Sign in to join this conversation.
No description provided.