Skip to content

Next version - 2.3.0 - #103

Draft
larsll wants to merge 10 commits into
mainfrom
experimental
Draft

Next version - 2.3.0#103
larsll wants to merge 10 commits into
mainfrom
experimental

Conversation

@larsll

@larsll larsll commented Jun 2, 2026

Copy link
Copy Markdown
Member

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:

  • Adds a new use-car-config hook, context, and provider to manage car configuration and capabilities, fetching data from the car_config API and exposing it throughout the app (website/src/common/hooks/use-car-config.ts).
  • Extends the supported APIs context and provider to detect and expose whether the car_config API and the new events SSE API are available (website/src/common/hooks/use-supported-apis.ts) [1] [2] [3] [4] [5] [6].

Context and provider wiring:

  • Integrates the new car config provider into the global context provider, ensuring all components can access car configuration state (website/src/components/context-provider.tsx) [1] [2].

UI updates and new settings tab:

  • Updates the settings page to include a new "Car Settings" tab, which conditionally renders the car configuration container if supported, and moves the "About" section above the tabs (website/src/pages/settings.tsx, website/src/components/settings/index.ts) [1] [2] [3].
  • Updates the homepage to use the new car config context for camera feed selection, enabling a gray overlay if supported and enabled (website/src/pages/home.tsx) [1] [2] [3] [4] [5] [6].

IMU safety stop notifications:

  • Adds IMU configuration controls to the "Car Settings" tab: an enable toggle and independent sliders for crash (g-force threshold) and pickup (gravity threshold) safety stops, gated on backend capability detection (website/src/components/settings/car-config-container.tsx).
  • Implements a real-time IMU safety stop notification on the "Control Vehicle" page using Server-Sent Events (SSE). When the vehicle is active (isInferenceRunning) and the IMU is enabled, an EventSource connects to GET /api/events. On receipt of an imu_stop event (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).
  • Extends the supported APIs hook with an isEventsSupported flag, so the SSE EventSource is only opened when the backend exposes the /api/events endpoint (website/src/common/hooks/use-supported-apis.ts).

Dependency and threshold updates:

  • Updates Cloudscape Design dependencies to newer versions and adds the component toolkit (website/package.json).
  • Adjusts device status warning/error thresholds for CPU frequency and latency in the device status panel (website/src/components/device-status-panel.tsx).

larsll and others added 3 commits June 2, 2026 12:14
* Initial implementation

* Basic tests

* Reorganized settings screen

* Fix tests

* Remove file
* Implement diffdrive in configuration

Beta tag on Differential Drive

* Fix #104

* UI Tweaks
@larsll larsll changed the title Next version Next version - 2.3.0 Jun 5, 2026
… 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
larsll and others added 3 commits June 5, 2026 17:37
larsll and others added 2 commits June 6, 2026 15:09
)

* Add IMU configuration

* Updated with UI eventhandling

* Moved event source to home page only

* Add tests
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