feat: support the p987 vehicle type in the dashboard - #229
Conversation
Vehicles are validated against this set, so without it a 987 cannot be created at all — and the dashboard's type dropdown reads the same list. Ordered first as the newest car.
getWidgetRegistry returned an empty object for anything it did not recognize, so a 987 vehicle rendered with no widgets to choose from. Groups are the car's own ECUs rather than GR-designed nodes, since the 987 runs stock Porsche CAN. The four ECU debug widgets share one component and pass their own signal list — gr26 writes one longhand per node, which does not scale to the seven ECUs the 987 decodes. The TCM widget is deliberately not a copy of gr25's: the 987's TCM is a Pi Zero 2 W, so it shows four cores instead of six and drops the GPU and power-rail readings the board has no sensors for. The throttle flags take their place, and separate "active" from "seen since boot" — a set since-boot flag with a clear live flag means the event happened earlier in this power cycle, which is exactly what you want to know after a session.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 177092ed0b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // VehicleTypes is the canonical ordered list (newest first), surfaced via the | ||
| // API so the frontend's create-vehicle and flag dialogs don't hardcode it. | ||
| var VehicleTypes = []VehicleType{GR26, GR25, GR24} | ||
| var VehicleTypes = []VehicleType{P987, GR26, GR25, GR24} |
There was a problem hiding this comment.
Once a p987 vehicle is created, the sidebar switcher, vehicle list, and vehicle details page all request /icons/cars/p987-pixel.png, but no such asset exists under dashboard/public/icons/cars and these image components have no fallback. Consequently every standard vehicle view displays a broken image for the newly exposed type; add the asset or provide a generic fallback before registering it.
Useful? React with 👍 / 👎.
A 987 vehicle could not be created, and if it had been it would have rendered with no widgets.
vehicle— registerp987as a vehicle type. Vehicles are validated against this list and the dashboard's type dropdown reads it from/vehicle-types, so nothing else works without it. Ordered first as the newest car.dashboard— add ap987widget registry.getWidgetRegistryreturned{}for unrecognised types.Groups are the car's own ECUs rather than GR-designed nodes, since the 987 runs stock Porsche CAN. The four ECU widgets share one component and pass their own signal list from
p987/live/signals.ts— gr26 writes one longhand per node, which doesn't scale to seven ECUs.The TCM widget is not a copy of gr25's: the 987's TCM is a Pi Zero 2 W, so it shows four cores instead of six and drops the GPU and power-rail readings the board has no sensors for. Throttle flags take their place and separate "active" from "seen since boot" — a set since-boot flag with a clear live flag means the event happened earlier in this power cycle, which is what you want to know after a session.
Worth knowing
pcan. Names are<bus>_<signal>and the bus comes from the relay'sCAN_INTERFACES(can0:pcanin TCM-987'sexample.env). Relabel the interface andsignals.tshas to follow. It's oneconst busat the top of that file./widgets/p987/*.png, which don't exist yet — same as gr25's widgets, whose previews were never added either. The picker shows a broken image until someone screenshots them.tsc --noEmit,npm run buildandeslintall clean;vehiclebuilds and vets clean.