feat(dashboard): add battery endurance tracker widget#219
Merged
Conversation
Lap-by-lap SOC, min cell voltage, and max cell temperature with boundary projections (laps until >60C, <20% SOC, 0% SOC), per-lap deltas/% change, event statistics, and a 0-35 min voltage/temperature graph with regression projection lines. Manual lap capture persists to localStorage so the table survives page refresh and Sentinel token expiry. Registered as a full-width gr26 BCU widget.
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.
Full-width gr26 BCU dashboard widget for monitoring the accumulator lap-by-lap during an endurance event.
Changes
registry.tsx.Lap +1) snapshots current live SOC / min cell voltage / max cell temp./query/pairs) with dashed regression projection lines extended to each boundary, plus 60 °C / voltage-floor reference lines and a finish marker.battery_endurance_v1_<vehicleId>. Survives page refresh and Sentinel token expiry — the persisted table is decoupled from the live socket (usesuseLiveSignalsdirectly rather than wrappingLiveWidget), so it stays visible when the connection drops.dashboard/src/lib/batteryEndurance.ts(state/persistence + least-squares regression and projection math) with unit tests.Verification
npm run build,tsc --noEmit,eslint --max-warnings 0clean; 14 unit tests pass (batteryEndurance.test.ts).sentinel_access_token.