You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The vehicle's sheet: its specifications, its picture and its name #201
The providers tell what the vehicle is, and Runsten keeps only its model, model year, powertrain and battery capacity. Observed on real vehicles, read nowhere:
Volvodetails: externalColour, gearbox, descriptions.steering, descriptions.upholstery, specifications.driveType, specifications.enginePowerKw, specifications.engineCapacityCc (combustion and hybrids), specifications.firstRegistrationDate, specifications.grossWeightKg, specifications.numberOfSeats, and images.exteriorImageUrl / images.internalImageUrl. The specifications block is missing from the demo car's response (testdata/volvo-demo-car/cv-vehicle.json).
Teslavehicle_data: vehicle_config.exterior_color, wheel_type, rhd, performance_package, roof_color, third_row_seats, and vehicle_state.vehicle_name, the name the owner gave the car.
Polestar: the API tells none of it.
To do
Normalize them (a new field, reported by the details and by vehicle_data), and give them in the vehicle's API, each absent when the source does not tell it.
Web: a "Sheet" section in the vehicle's settings, beside the model, with only the values told: colour, gearbox, drive, power, engine capacity, first registration, weight, seats, upholstery, steering.
Web: the exterior picture beside the vehicle (its menu, the home page). The URL is Volvo's CDN (cas.volvocars.com): served through the API rather than loaded by the browser from Volvo, so that the browser calls no third party (to decide, with the CSP).
Tesla's vehicle_name as the vehicle's label when the user gave it none.
The simulator and the fixtures give the specifications block; documentation.
Formats (the latest details of the 13 Volvos in production, read only): specifications.driveType is FWD, RWD or AWD; firstRegistrationDate a local date-time without a zone (2025-12-10T00:00:00), taken as a date; enginePowerKw a number, grossWeightKg, numberOfSeats and engineCapacityCc integers (the latter for combustion engines and hybrids only). externalColour is a name (Powder Blue); descriptions.upholstery is mostly a code (R310, CHARCOAL/LEAA/CHARCOAL); gearboxAUTOMATIC; steeringLEFT. One vehicle has no specifications at all, another one without firstRegistrationDate: each value is absent when not told.
Model: one new snapshot field, FieldSheet, covered by Volvo's details and by Tesla's vehicle_data (its vehicle_config and vehicle_state.vehicle_name). Polestar tells none of it.
API: the vehicle gets sheet, each value null when the source does not tell it, and picture (whether one can be served).
Picture: the pictures are on two hosts of Volvo, cas.volvocars.com and wizz.volvocars.com. The browser never loads them: GET /api/v1/vehicles/{id}/picture relays the exterior picture of the vehicle's latest details, never a URL from the request, only over https from *.volvocars.com, an image type only, cached in memory by runsten-api (bounded, a day), sent with Cache-Control: private. The CSP stays img-src 'self'. Its w parameter is lowered from 1920 to 640 (assumption: the CDN scales it; a thumbnail and a tile need no more). The interior picture is not used.
Name: Tesla's vehicle_name labels the vehicle (web and MQTT's device), ahead of the variant; Runsten has no name of its own to give a vehicle yet.
Web: a "Sheet" tile under the model in the vehicle's settings, the main values first and the rest folded; the picture as a thumbnail in the vehicle's menu, and on the vehicle's tile of its state page.
Done in the working tree of feat/vehicle-sheet, not committed yet:
core.FieldSheet / core.Sheet, read from Volvo's details and Tesla's vehicle_config and vehicle_state.vehicle_name; the vehicle's sheet in the API; GET /vehicles/{id}/picture through a new internal/picture relay.
Tesla's words for none (None, <invalid>, Base, an empty string) are absent; its colours are written in words (DeepBlue → Deep Blue, RoofColorGlass → Glass). A performance package other than Base and a third row other than None are assumptions: only those two values were read.
third_row and performance are plain booleans in the API (false: none or not told). The contract's mutation tests refuse a nullable boolean that is always null in the golden files.
The demo car's recorded details get a specifications block, taken from a real V60 Cross Country of the same year, without engineCapacityCc: the simulator's electric cars do not tell it, and its shape test compares the keys. The simulator gives the block too, plausible values for an EX30 and a V60 T6, and still no picture (Volvo's CDN is not simulated).
Web: a "Sheet" tile under the model in the vehicle's settings (colour, drive, power, first registration, seats; the rest under "Show more"); the picture in the vehicle's menu (the button and each row) and on the "Vehicle" tile of the state page; a Tesla's name as its label, in the web and in Home Assistant's device.
Docs: the guide (vehicle models, Tesla, MQTT), the API reference, AGENTS.md.
Checked: task unit-go, task integration (coverage 95.9 %), the front end's lint, type check and tests (1479). Not seen on a running stack.
8ce6ba3: the sheet read from Volvo's details and Tesla's vehicle_config (core.Sheet), the vehicle's sheet in the API, the picture relayed by GET /vehicles/{id}/picture (internal/picture), a Tesla's name on its Home Assistant device, the specifications block in the simulator and the demo car's details.
1557a55: the Sheet tile in the vehicle's settings, the picture in the vehicle's menu and on its state, a Tesla's name as its label.
22afd1f: Volvo's CDN refuses a request without Accept-Language and Accept-Encoding, or with Go's own User-Agent (403 "Access Denied", every time; a browser gets the picture). The relay sends Accept-Language and Runsten/<version>; checked on a real picture through the relay, which the CDN gives about 640 px wide (750).
7325fbf: the tile's picture cropped of its empty ground; the menu's labels aligned when only some vehicles have a picture.
5ba80e8: the simulated Volvos registered the September before their model year, not in the future.
Screenshots in the pull request, light and dark, desktop and phone.
Rebased on main after the temperatures work (#208), conflicts resolved (FieldClimate and FieldSheet side by side, the Tesla fixture's test, the state tile's imports, AGENTS.md, the API reference); the API's contract regenerated unchanged. #211 is now ecdf032…d8e11e2, mergeable; task unit-go, task integration (coverage 96.0 %) and the front end's lint, type check and tests pass.
runsten b7ebfae, pushed to #211: the browser test of a vehicle's settings read every term of its area, the sheet's included, and failed the system job; it now reads the model's facts alone and checks the sheet.
Done in runsten b47c3cf (#211): the vehicle's sheet read from Volvo's details and Tesla's vehicle_config, given in the API; Volvo's picture relayed by runsten-api (the headers its CDN requires); the Sheet tile in the vehicle's settings, the picture in the vehicle's menu and on its state; a Tesla's name as its label, in the web and in Home Assistant; the simulator, fixtures and documentation.
Activity
vcanuel commentedon Oct 31, 2026
Scope and decisions, before the code:
detailsof the 13 Volvos in production, read only):specifications.driveTypeisFWD,RWDorAWD;firstRegistrationDatea local date-time without a zone (2025-12-10T00:00:00), taken as a date;enginePowerKwa number,grossWeightKg,numberOfSeatsandengineCapacityCcintegers (the latter for combustion engines and hybrids only).externalColouris a name (Powder Blue);descriptions.upholsteryis mostly a code (R310,CHARCOAL/LEAA/CHARCOAL);gearboxAUTOMATIC;steeringLEFT. One vehicle has nospecificationsat all, another one withoutfirstRegistrationDate: each value is absent when not told.FieldSheet, covered by Volvo's details and by Tesla'svehicle_data(itsvehicle_configandvehicle_state.vehicle_name). Polestar tells none of it.sheet, each value null when the source does not tell it, andpicture(whether one can be served).cas.volvocars.comandwizz.volvocars.com. The browser never loads them:GET /api/v1/vehicles/{id}/picturerelays the exterior picture of the vehicle's latest details, never a URL from the request, only over https from*.volvocars.com, an image type only, cached in memory by runsten-api (bounded, a day), sent withCache-Control: private. The CSP staysimg-src 'self'. Itswparameter is lowered from 1920 to 640 (assumption: the CDN scales it; a thumbnail and a tile need no more). The interior picture is not used.vehicle_namelabels the vehicle (web and MQTT's device), ahead of the variant; Runsten has no name of its own to give a vehicle yet.vcanuel commentedon Oct 31, 2026
Done in the working tree of
feat/vehicle-sheet, not committed yet:core.FieldSheet/core.Sheet, read from Volvo's details and Tesla'svehicle_configandvehicle_state.vehicle_name; the vehicle'ssheetin the API;GET /vehicles/{id}/picturethrough a newinternal/picturerelay.None,<invalid>,Base, an empty string) are absent; its colours are written in words (DeepBlue→Deep Blue,RoofColorGlass→Glass). A performance package other thanBaseand a third row other thanNoneare assumptions: only those two values were read.third_rowandperformanceare plain booleans in the API (false: none or not told). The contract's mutation tests refuse a nullable boolean that is always null in the golden files.specificationsblock, taken from a real V60 Cross Country of the same year, withoutengineCapacityCc: the simulator's electric cars do not tell it, and its shape test compares the keys. The simulator gives the block too, plausible values for an EX30 and a V60 T6, and still no picture (Volvo's CDN is not simulated).Checked:
task unit-go,task integration(coverage 95.9 %), the front end's lint, type check and tests (1479). Not seen on a running stack.vcanuel commentedon Oct 31, 2026
runsten 8ce6ba3, 1557a55, 747b09e, in #211:
vehicle_config(core.Sheet), the vehicle'ssheetin the API, the picture relayed byGET /vehicles/{id}/picture(internal/picture), a Tesla's name on its Home Assistant device, thespecificationsblock in the simulator and the demo car's details.Remains: the merge, after a rebase on the doors and temperatures work (the API's golden files and
api/openapi.yamlregenerated then).vcanuel commentedon Oct 31, 2026
runsten 22afd1f, 7325fbf, 5ba80e8, pushed to #211:
Accept-LanguageandAccept-Encoding, or with Go's ownUser-Agent(403 "Access Denied", every time; a browser gets the picture). The relay sendsAccept-LanguageandRunsten/<version>; checked on a real picture through the relay, which the CDN gives about 640 px wide (750).Screenshots in the pull request, light and dark, desktop and phone.
vcanuel commentedon Oct 31, 2026
Rebased on main after the temperatures work (#208), conflicts resolved (
FieldClimateandFieldSheetside by side, the Tesla fixture's test, the state tile's imports, AGENTS.md, the API reference); the API's contract regenerated unchanged. #211 is now ecdf032…d8e11e2, mergeable;task unit-go,task integration(coverage 96.0 %) and the front end's lint, type check and tests pass.vcanuel commentedon Nov 1, 2026
runsten b7ebfae, pushed to #211: the browser test of a vehicle's settings read every term of its area, the sheet's included, and failed the system job; it now reads the model's facts alone and checks the sheet.
vcanuel commentedon Nov 1, 2026
Done in runsten b47c3cf (#211): the vehicle's sheet read from Volvo's details and Tesla's
vehicle_config, given in the API; Volvo's picture relayed byrunsten-api(the headers its CDN requires); the Sheet tile in the vehicle's settings, the picture in the vehicle's menu and on its state; a Tesla's name as its label, in the web and in Home Assistant; the simulator, fixtures and documentation.