mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-08-07 19:56:18 -04:00
feat: add replay track map scrubber
Spike: replay location fan-out is bounded with a semaphore at 4 concurrent GetLocation calls, covered by TestAssembleReplayFramesBoundsLocationFanOut. Adds /api/v1/replay/frames with 5s interval floor, 3000-frame cap, nearest-sample snapping, and empty-driver omission. Wires RaceStoryCanvas to lazy-load replay frames plus cached track outlines when the map panel opens, sharing the existing scrubber/playback state across chart and map. Tests: HOME=/private/tmp/box-box-home GOCACHE=/private/tmp/box-box-go-cache GOMODCACHE=/Users/aman/go/pkg/mod go test ./internal/web; go build ./... (same env, passed with read-only module stat-cache warning); npm run test; npx tsc --noEmit. Full go test ./... is blocked in this sandbox by existing network/listener-dependent internal/api and internal/news tests.
This commit is contained in:
@@ -75,6 +75,7 @@ func (s *Server) routes() (http.Handler, error) {
|
||||
mux.HandleFunc("/api/v1/grid", s.handleGrid)
|
||||
mux.HandleFunc("/api/v1/laps/comparison", s.handleLapsComparison)
|
||||
mux.HandleFunc("/api/v1/laps", s.handleLaps)
|
||||
mux.HandleFunc("/api/v1/replay/frames", s.handleReplayFrames)
|
||||
mux.HandleFunc("/api/v1/weather", s.handleWeather)
|
||||
mux.HandleFunc("/api/v1/race-control", s.handleRaceControl)
|
||||
mux.HandleFunc("/api/v1/telemetry", s.handleTelemetry)
|
||||
|
||||
Reference in New Issue
Block a user