Next version - 2.3.0 - #103
Draft
larsll wants to merge 10 commits into
Draft
Conversation
* Initial implementation * Basic tests * Reorganized settings screen * Fix tests * Remove file
Fix broken test
* Implement diffdrive in configuration Beta tag on Differential Drive * Fix #104 * UI Tweaks
… page (#106) * Working mode * Adjust warnings * refactor: move car config state into shared useCarConfig context - Extract CarConfig, Capabilities, CarConfigResponse interfaces into use-car-config.ts so they are shared across the app - useCarConfigProvider now stores full config + capabilities and exposes a refresh() callback (increments a tick, re-triggers the fetch effect) - car-config-container no longer calls ApiHelper.get directly; it reads config/capabilities from the context via useCarConfig() - After Save, component calls refresh() to sync the shared context so home.tsx isGrayOverlayEnabled stays up to date without a page reload - Refresh button calls handleRefresh() which discards local draft changes immediately and triggers a context re-fetch - Remove isGrayOverlaySupported / isGrayOverlayEnabled from useSupportedApis; they belong in useCarConfig - All 474 tests pass * fix: clear local draft state on null context; fix provider name in error message - car-config-container: clear draft and savedConfig when contextConfig becomes null (logout / API unsupported) so the form doesn't show stale settings with Save still enabled - use-car-config: correct error message to name CarConfigInnerProvider (the actual provider used in context-provider.tsx) Eslint fix
* Upgrade packages * Linting * Remove test noise * More linting
* Initial implementation * Fix eslint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new car configuration context and API integration to the frontend, enabling the UI to access and display car-specific configuration and capability information. It also updates the settings page to include a new "Car Settings" tab, conditionally displaying car configuration controls if the API is supported. Additionally, it updates dependencies and makes minor adjustments to device status thresholds and camera feed logic.
Car configuration and API support integration:
use-car-confighook, context, and provider to manage car configuration and capabilities, fetching data from thecar_configAPI and exposing it throughout the app (website/src/common/hooks/use-car-config.ts).car_configAPI and the neweventsSSE API are available (website/src/common/hooks/use-supported-apis.ts) [1] [2] [3] [4] [5] [6].Context and provider wiring:
website/src/components/context-provider.tsx) [1] [2].UI updates and new settings tab:
website/src/pages/settings.tsx,website/src/components/settings/index.ts) [1] [2] [3].website/src/pages/home.tsx) [1] [2] [3] [4] [5] [6].IMU safety stop notifications:
g-force threshold) and pickup (gravity threshold) safety stops, gated on backend capability detection (website/src/components/settings/car-config-container.tsx).isInferenceRunning) and the IMU is enabled, anEventSourceconnects toGET /api/events. On receipt of animu_stopevent (published by the ROS2 IMU node when a crash or pickup is detected), a dismissible flash message appears with a 5-second auto-dismiss timer that resets on repeated events (website/src/pages/home.tsx).isEventsSupportedflag, so the SSEEventSourceis only opened when the backend exposes the/api/eventsendpoint (website/src/common/hooks/use-supported-apis.ts).Dependency and threshold updates:
website/package.json).website/src/components/device-status-panel.tsx).