sync racing standings #80

Merged
chrisp merged 6 commits from claude/gallant-bell-cuzqgx into main 2026-06-10 04:25:49 +00:00

6 commits

Author SHA1 Message Date
Claude
15097ddcf8
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
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
2026-06-10 04:15:03 +00:00
Claude
40e1ba22b8
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
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
2026-06-09 23:12:34 +00:00
Claude
52277ab864
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
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
2026-06-09 21:48:43 +00:00
Claude
da0e118886
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
https://claude.ai/code/session_012ACmUs2vAwEF9jZu7Guos2
2026-06-09 19:02:49 +00:00
Claude
a6d8162bdf
Fix 5 code review issues in F1/IndyCar standings sync
- 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
2026-06-09 19:02:07 +00:00
Claude
9541318adf
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
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
2026-06-09 18:33:10 +00:00