mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-12-05 06:44:41 -05:00
* fix(championship): drop cancelled rounds and declare a clinched title The championship hub counted cancelled meetings (2026 Bahrain/Saudi) as rounds, reporting 25 total / 6 left instead of 23 / 4. Title math then used 6 x 25 = 150 pts as the ceiling, so a 119-pt gap still looked "alive" after Antonelli had mathematically clinched the title. - Skip cancelled meetings and cancelled Race/Sprint sessions in both the local (query) and OpenF1 aggregation paths. - Track pending sprints and return sprints_left + max_points_left (25/race + 8/sprint) so title math is sprint-aware. - Frontend: use max_points_left for alive/out, gap annotations and the simulator; show a CHAMPION state, "has clinched" title math, and a Champion stat tile once P2 cannot catch the leader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(championship): resolve ties on countback in title math Review feedback: - Local standings broke points ties by driver number, so a season ending level could crown the wrong driver. Order ties by FIA countback (most GP wins, then P2s, ...) before falling back to driver number. - An exact-gap lead was always treated as open. It is a clinch when the leader still wins the countback even if the rival takes every remaining GP. Every rival, not just P2, is now checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
box-box Web Frontend
React Race Hub slice for the production Web UI.
Commands
npm install
npm run dev
npm test -- --run
npm run build
The Vite dev server proxies /api requests to the Go server on
http://localhost:8080.
Run the backend separately:
go run cmd/main.go --web
Then open the React app, usually:
http://localhost:5173/race-hub
Load an ingested session with:
http://localhost:5173/race-hub?session_key=9472