Repository navigation
Show the state of charge over a strip of what the vehicle was doing - #226
Conversation
The bands behind the series, full height and faint, were hard to tell apart and to read against the line. They now sit in a strip of their own between the plot and the x axis's ticks: solid where the event surely was, paler where it may have been, named inside when the name fits. A series may also be an area, filled faintly down to the axis, which needs Chart.js's Filler: the interquartile bands of the statistics and of the battery, filled towards their lower bound, now are as their code meant. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…was doing The state of charge tile showed 7 days, where a trip of half an hour is a sliver, and a charge in a grey hardly seen. It now shows the last 24 hours by default, 7 days on a toggle, the level as a filled area, and under it a strip of what the vehicle was doing: driving, charging (in its own color), parked wherever it was read outside them, and nothing where nothing was read. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tion A trip of a few minutes is a sliver in the strip: under the pointer, a band now says what it is, the day it began, its times as honest as its bounds, and how long it lasted. Chart.js calls onHover inside the plot only: the strip's pointer is heard by the plugin's afterEvent, a few pixels around a band counting so that one of a pixel can still be pointed at. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Until every page of the events is read, a trip may hide in a stretch drawn as parked: it is then drawn paler, as an event not sure. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tip of a band is for the pointer: a screen reader is now given the same in a list, beside the chart's table. The tip wraps within half the canvas, which is always free on the side it opens to, so that it stays inside on a phone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Chart area and activity strip web/src/shared/ui/chart/series.ts, web/src/shared/ui/chart/ChartFrame.vue, web/test/shared/ui/ChartFrame.test.ts |
Chart series support filled areas. ChartFrame draws event bands in a strip below the plot, with distinct uncertain and certain spans, labels, pointer details, and screen-reader content. |
Timeline windows and activity bands web/src/widgets/soc-timeline/ui/SocTimeline.vue, web/src/shared/i18n/locales/en.json, web/src/shared/i18n/locales/fr.json, web/src/shared/i18n/locales/sv.json, web/test/widgets/soc-timeline/SocTimeline.test.ts |
SocTimeline defaults to 24 hours and can switch to 7 days. It creates event and parked bands with formatted details and certainty bounds. Translations and tests cover both windows. |
Possibly related issues
- Polestar 3 - first drives & charge + API docs #149: The timeline displays unread periods, but this change does not address missing-reading collection.
Possibly related PRs
- runsten-app/runsten#196: This PR changes the formatter used for activity-band dates, time ranges, and durations.
- runsten-app/runsten#184: This PR changes
ChartFrameandSocTimeline, which this PR also updates.
Merge Risk: 
Minimal · up to 911a6
-
The timeline adds selectable windows and activity bands; no merge-blocking risk was identified.
Security architecture risk: 
Low · up to 911a6
-
The changes remain within vehicle-data presentation and preserve existing account-based access controls. No introduced security concern was identified. Residual uncertainty concerns asynchronous loading and recovery behavior, rather than expanded privileges or data access.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- inferred — The assessed exposure remains the existing account-authorized vehicle-data read path and shared browser chart rendering. The component export does not create a network endpoint, and the changed flow adds no write authority.
Trust Boundaries and Controls
- observed — New band labels are drawn with canvas text; pointer details and accessible descriptions use Vue text interpolation. The inspected detail-rendering path does not interpret those strings as HTML.
-
Pre-merge checks: 
4
-
Full details: Linked Issues check
-
Explanation
Issue [
#225] has coding requirements.SocTimeline.vuedefaults to 24 hours and supports a 7-day toggle. It renders state of charge as an area and renders driving, charging, parked, and unread intervals on a same-axis strip. It marks uncertain intervals as paler, labels intervals when space permits, and provides interval details.ChartFrame.vueadds screen-reader band details. Tests cover the window toggle, area series, parked intervals, incomplete event pages, and empty readings.
Full details: Out of Scope Changes check
-
Explanation
The locale updates, chart model changes,
ChartFrame.vuestrip and accessibility changes,SocTimeline.vuechanges, and related tests support issue [#225].Fillerregistration supports the new filled area and the existing lower-bound band fills. No unrelated change is established by the available pull request evidence.
-
hasMore is false before the first page of the trips or charges arrives, and when it fails: parked is now sure only once both are read, without error, and with no page left. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The state of charge tile of the vehicle's page was hard to read: trips and charges were faint full-height bands behind the line (a charge in a grey that hardly showed), and over 7 days a trip of half an hour was a sliver. It now shows the level as a filled area over a strip of what the vehicle was doing (driving, charging, parked, nothing where nothing was read), the last 24 hours by default and 7 days on a toggle; pointing at a stretch of the strip tells its day, times and duration.
Changes
onHoverhears the plot only: the plugin'safterEventhears the strip); a screen reader gets the same in a list. A series may be an area, filled faintly down to the axis.Filleris now registered, which the area needs. The interquartile bands of the statistics (cost per distance) and of the battery (capacity), which setfill: '-1', now fill towards their lower bound as their code meant; they did not before.chart-5). Parked is computed where the vehicle was read, outside the trips and charges; it is only "maybe" (paler) while a page of the events is missing.Screenshots
The tile only, on a made-up week (the series, trips and charges answered by the browser, the same on both sides: the development data is flat).
Look at the strip under the line, the charge's color, and the gap where nothing was read (31 Oct). Under the pointer:
Tests
task unitpassed; the web's 1567 tests, eslint, prettier and vue-tsc pass. New tests for the strip, its tip, the parked stretches and the toggle.Closes #225
🤖 Generated with Claude Code
Summary by CodeRabbit