Repository navigation
Show the variant's net capacity where the car reports none - #163
Conversation
A Polestar read through the Data Portal, or a Tesla through the Owner API, reports no battery capacity, so the vehicle page's tile said Unknown, which reads as a setup gone wrong. It now shows the net capacity of the vehicle's variant, the one its energies rest on, marked as usable and from the variant. A capacity the car reports keeps its place. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Capacity fallback and display web/src/widgets/vehicle-state/ui/VehicleState.vue, web/src/shared/i18n/locales/*.json, web/test/widgets/vehicle-state/VehicleState.test.ts, documentation/guide/polestar.md, documentation/guide/tesla.md |
When reported battery capacity is absent, the vehicle page displays the selected variant’s net_kwh with a localized source label. Reported capacity takes precedence. Tests cover both cases, and the Polestar and Tesla guidance describes the variant capacity display. |
Possibly related PRs
- runsten-app/runsten#126: This PR changed the vehicle capacity display path that this change extends.
- runsten-app/runsten#157: This PR added Tesla variants with usable capacity, which this change reads for the vehicle page.
Priority:
Severity of issue fixed: Medium
Merge Risk: 
Minimal · previous review c828b
-
The capacity fallback appears mergeable after normal checks; no specific issue remains identified.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title "Show the variant's net capacity where the car reports none" describes the main change: the Battery tile falls back to the variant's net_kwh when the car reports no battery capacity. It is specific and matches the changeset and linked issue
#138. It is imperative and in English, but it does not follow the requested prefix pattern exactly, since it is phrased as a sentence fragment rather than a clear imperative verb-led description of the user-facing effect. The content is accurate, so the title passes.
Full details: Description check
-
Explanation
The description follows the repository template. It explains what changes and why, links the issue (Closes
#138), and describes the front end and docs changes. It includes before and after screenshots, which the template asks for on interface changes. The test section lists task unit-web, notes that task unit-go was not run, and explains that e2e did not run locally. The template checklist items for the API diff and the no-secrets check are not addressed explicitly, and the text covers English, French and Swedish. Those gaps are minor, so the description is mostly complete.
Full details: Linked Issues check
-
Explanation
Issue
#138requires variantnet_kwhfallback whenbattery_capacity_kwhis absent, a source label, reported-capacity precedence,Unknownwithout a usable variant value, English/French/Swedish text, and tests. The summary showsVehicleState.vueimplements these cases. Locale files add the labels.VehicleState.test.tscovers fallback, reported capacity, localization, and no-variant behavior.
Full details: Out of Scope Changes check
-
Explanation
The component change, translations, tests, and Polestar and Tesla guide updates support issue
#138. The documentation explains the new variant-capacity behavior. No unrelated change is shown in the reviewed summary.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Its note is wider than the Unknown it replaces, so the capacity went under the range on a narrow tile. It now shrinks, its note wrapping. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A Polestar read through the Data Portal, or a Tesla through the Owner API, reports no battery capacity, so the vehicle page's Battery tile said Unknown, which reads as a setup gone wrong. Where the car reports none, the tile now shows the net capacity of the vehicle's variant, the one its energies rest on, marked "Usable, from the variant". A capacity the car reports keeps its place.
Changes
net_kwhwhenbattery_capacity_kwhis absent; nothing shows without a variant either way (Unknown, as before). Texts in English, French and Swedish.Screenshots
A simulated Polestar 2 Long Range Single Motor 2024, its variant chosen.
The Battery tile: Unknown becomes 79 kWh, usable, from the variant (desktop, then phone).
Tests
task unit-web(typecheck, lint, 1383 tests, build): passed, with tests for the variant's capacity in each language and for a capacity the car reports (the other tests run without a variant).task unit-gonot run: no Go changed. The e2e did not run locally.Closes #138
🤖 Generated with Claude Code
Summary by CodeRabbit