Skip to content

Conversation

@tariknz
Copy link
Owner

@tariknz tariknz commented Jun 20, 2025

Adds settings for the standings overlay:

image

Reset configs:

image

@tariknz tariknz marked this pull request as ready for review June 20, 2025 01:40
@tariknz tariknz requested a review from Copilot June 20, 2025 01:41
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

Adds widget-level settings for the standings overlay and a “reset to defaults” feature for dashboards.

  • Introduces a resetDashboard bridge method and context API for partial or full dashboard resets.
  • Implements per-setting toggles in StandingsSettings and UI buttons in AdvancedSettings.
  • Updates defaults, types, storage logic, and Storybook mocks to support configurable standings fields.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/types/dashboardBridge.ts Added resetDashboard signature to the DashboardBridge API
src/frontend/context/shared/useCarIdxAverageLapTime.ts Updated docstring for average lap time hook
src/frontend/context/DashboardContext/DashboardContext.tsx Added resetDashboard handler to provider
src/frontend/context/CarSpeedStore/CarSpeedsStore.tsx Changed SPEED_UPDATE_INTERVAL from exported to internal
src/frontend/components/Standings/hooks/useStandingsSettings.tsx New hook to fetch standings widget config
src/frontend/components/Standings/hooks/index.ts Exported the new useStandingsSettings
src/frontend/components/Standings/components/DriverInfoRow/DriverInfoRow.tsx Made badge prop optional and conditional columns
src/frontend/components/Standings/Standings.tsx Wired in settings toggles and imported new hook
src/frontend/components/Settings/types.ts Defined the new config shape for standings widget
src/frontend/components/Settings/sections/StandingsSettings.tsx Implemented UI and migration for new standings config
src/frontend/components/Settings/sections/AdvancedSettings.tsx Added “Reset Configurations” and “Reset Everything” buttons
src/app/storage/defaultDashboard.ts Initialized default config for standings widget
src/app/storage/dashboards.ts Added resetDashboard logic for full/partial resets
src/app/bridge/rendererExposeBridge.ts Exposed resetDashboard over IPC in renderer
src/app/bridge/dashboard/dashboardBridge.ts Registered IPC handler for resetDashboard
.storybook/mockDashboardBridge.ts Provided a mock resetDashboard implementation
Comments suppressed due to low confidence (1)

src/frontend/context/CarSpeedStore/CarSpeedsStore.tsx:18

  • Removing the export from SPEED_UPDATE_INTERVAL can break any modules that import it. If external consumers rely on this constant, re-add export or update all import sites accordingly.
const SPEED_UPDATE_INTERVAL = 0.1; // Update interval in seconds

@tariknz tariknz merged commit de453fd into main Jun 20, 2025
1 check passed
@tariknz tariknz deleted the feat/standing-settings branch June 20, 2025 05:01
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