Skip to content

feat: move driver controls to channels - #668

Merged
tariknz merged 2 commits into
mainfrom
feat/driver-controls-channel
Aug 8, 2026
Merged

feat: move driver controls to channels#668
tariknz merged 2 commits into
mainfrom
feat/driver-controls-channel

Conversation

@tariknz

@tariknz tariknz commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Description

Phase 4 follow-up to docs/ARCHITECTURE_REVIEW.md.

Moves the Input and Tachometer widgets off the legacy renderer-wide telemetry firehose and onto a typed, demand-driven driver-controls.snapshot channel. The main-process processor projects the minimum full-precision input and engine values required by those widgets, publishes only changed state, and is active only while a renderer subscribes.

The runtime is wired through both live/tape and mock sources. Input requests the channel at up to 60 Hz, while Tachometer uses its driver-focused rate. Shift-light thresholds are sourced from session data instead of the previous invalid telemetry-key casts. Storybook fixtures and the curated replay validator now seed and validate the new snapshot.

The implementation plan now records the four remaining Phase 4 slices: this driver-controls migration, positional/warning consumers, low-frequency/debug consumers, and final legacy telemetry deletion with re-profiling.

Validation:

  • npm run lint -- --no-fix
  • npm run test -- --no-coverage — 1,218 passed, 1 skipped
  • npm run test:replay:curated — 36,000 frames, 70 session revisions, 12 probes
  • git diff --check

Architecture pre-PR checklist:

  • N1 — no new synchronous filesystem access
  • N2 — no frontend imports from src/app
  • N3 — no cross-widget imports
  • N4 — no new IPC handlers
  • R2.1/R2.2 — full precision retained for driver inputs
  • R3.1 — no new renderer session-derived store
  • R4.1 — existing typed channel bridge used
  • R6.1 — no storage changes
  • R7.1 — widget runtime metadata updated without registry god-file changes
  • R8.1 — no settings shape changes
  • R10.1 — no native changes
  • R11.1 — no direct console logging
  • R13.1 — processor and publication paths are performance-instrumented
  • R14.1 — processor/runtime tests and curated replay coverage added
  • Storybook snapshots updated for both affected widgets

Screenshots

No visual changes expected; Input and Tachometer retain their existing presentation.

Before

Input and Tachometer subscribed to the legacy renderer-wide telemetry store.

After

Input and Tachometer consume driver-controls.snapshot; renderers containing only migrated widgets no longer require legacy telemetry.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Performance improvement
  • Refactoring (no functional changes)
  • Documentation update
  • Dependency update

Checklist

  • I have discussed this change in the discord server
  • I have tested this in iRacing (either in an online session or with AI)
  • All tests pass locally via npm test
  • I have added tests that prove my fix is effective or that my feature works
  • I have run npm run lint and fixed any issues
  • I have performed a self-review of my own code
  • I have added/updated Storybook stories for visual changes
  • I have updated the README.md (if applicable)
  • I have updated defaultDashboard.ts if introducing new widgets or configurations (if applicable)

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@tariknz, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e0453ae3-8f92-4915-9e56-a89d295c2364

📥 Commits

Reviewing files that changed from the base of the PR and between e69c9ae and 0fcafd2.

📒 Files selected for processing (25)
  • docs/IMPLEMENTATION_PLAN.md
  • src/app/bridge/iracingSdk/iracingSdkBridge.ts
  • src/app/bridge/iracingSdk/mock-data/mockSdkBridge.ts
  • src/app/processors/DriverControlsProcessor.spec.ts
  • src/app/processors/DriverControlsProcessor.ts
  • src/app/processors/driverControlsRuntime.spec.ts
  • src/app/processors/driverControlsRuntime.ts
  • src/frontend/components/Input/Input.stories.tsx
  • src/frontend/components/Input/hooks/useInputs.tsx
  • src/frontend/components/Input/widgetRuntimeDefinition.ts
  • src/frontend/components/RendererDataProviders/RendererDataProviders.spec.tsx
  • src/frontend/components/Tachometer/Tachometer.stories.tsx
  • src/frontend/components/Tachometer/hooks/useCarTachometerData.spec.tsx
  • src/frontend/components/Tachometer/hooks/useCarTachometerData.tsx
  • src/frontend/components/Tachometer/hooks/useCustomShiftPoints.spec.tsx
  • src/frontend/components/Tachometer/hooks/useCustomShiftPoints.tsx
  • src/frontend/components/Tachometer/hooks/useTachometerData.tsx
  • src/frontend/components/Tachometer/widgetRuntimeDefinition.ts
  • src/frontend/context/ChannelStore/index.ts
  • src/frontend/context/ChannelStore/useDriverControlsSnapshot.ts
  • src/frontend/widgetRuntime.spec.tsx
  • src/types/channels/channel.ts
  • test-data/telemetry/ai-race-10min.golden.json
  • tools/telemetry-replay/driver-controls-probe.ts
  • tools/telemetry-replay/run-curated-validation.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tariknz
tariknz marked this pull request as ready for review August 8, 2026 22:42
@tariknz
tariknz merged commit fa37ec4 into main Aug 8, 2026
7 checks passed
@tariknz
tariknz deleted the feat/driver-controls-channel branch August 8, 2026 22:45
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.

1 participant