Skip to content

Conversation

@tariknz
Copy link
Owner

@tariknz tariknz commented Jun 9, 2025

No description provided.

@tariknz tariknz changed the title Feat/relative take 2 add special handling for multi-class in relative deltas Jun 9, 2025
@tariknz tariknz changed the title add special handling for multi-class in relative deltas update logic for relative deltas, adds base work for speeds and avg laps Jun 14, 2025
@tariknz tariknz requested a review from Copilot June 14, 2025 08:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the relative delta calculation in standings, and introduces foundational hooks and stores for computing per-car speeds and average lap times.

  • Refactored useDriverRelatives to use session-based lap-time estimation and a streamlined filter/slice pipeline.
  • Added useCarIdxAverageLapTime and useCarIdxSpeed hooks with corresponding Zustand stores and comprehensive tests.
  • Aligned telemetry types (removing manual extensions) and tweaked test configs.

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vitest.config.ts Removed explicit include so all specs under src/ run by default
src/types/telemetry.ts Simplified Telemetry to mirror generated TelemetryVarList
src/frontend/context/index.ts Exported new hooks useCarIdxSpeed & useCarIdxAverageLapTime
src/frontend/context/TelemetryStore/TelemetryStore.tsx Updated setTelemetry signature to accept null
src/frontend/context/SessionStore/SessionStore.spec.tsx Changed test assertions to cast directly as Session
src/frontend/context/LapTimesStore/useCarIdxAverageLapTime.ts Implemented hook for per-car average lap times
src/frontend/context/LapTimesStore/useCarIdxAverageLapTime.spec.tsx Added tests covering fallback & update logic
src/frontend/context/LapTimesStore/LapTimesStore.tsx Built lap-times store with outlier filtering & median calculation
src/frontend/context/LapTimesStore/LapTimesStore.spec.tsx Added exhaustive tests for lap-times buffering & stats
src/frontend/context/CarSpeedStore/useCarIdxSpeed.ts Implemented hook for per-car speed calculation
src/frontend/context/CarSpeedStore/useCarIdxSpeed.spec.tsx Added tests for speed update & caching behavior
src/frontend/context/CarSpeedStore/CarSpeedsStore.tsx Built speed store with wrap-around handling & moving average
src/frontend/context/CarSpeedStore/CarSpeedsStore.spec.tsx Added tests for buffer window & wrap-around scenarios
src/frontend/components/Standings/hooks/useDriverRelatives.tsx Revamped relative‐delta logic and filtering around the player
src/frontend/components/Standings/hooks/useDriverRelatives.spec.tsx Updated tests to reflect new delta and buffer behavior
src/frontend/components/Standings/Relative.tsx Inserted spacing before <SessionFooter />
src/app/irsdk/types/_GENERATED_telemetry.ts Added optional TrackWetness to generated telemetry interface
.vscode/settings.json Enabled eslint.useFlatConfig

@tariknz tariknz marked this pull request as ready for review June 14, 2025 08:05
@tariknz tariknz merged commit de966ca into main Jun 14, 2025
1 check passed
@tariknz tariknz deleted the feat/relative-take-2 branch June 14, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants