Skip to content

Commit 565b4cd

Browse files
authored
Merge pull request #253 from RivianTrackr/claude/update-rivian-roamer-schema-iAP9F
Remove vehicle breakdown from tooltip, keep miles and vehicles only
2 parents 81d2630 + 324bfea commit 565b4cd

2 files changed

Lines changed: 6 additions & 17 deletions

File tree

frontend/js/modules/cards.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -427,17 +427,6 @@ export function createSingleCard(row) {
427427
if (veh > 0) {
428428
extraParts.push(veh.toLocaleString() + ' vehicle' + (veh !== 1 ? 's' : ''));
429429
}
430-
// Show vehicle breakdown by drivetrain if available.
431-
// Feed format is array of [name, count] pairs, e.g. [["Gen 1 R1T Dual",1],["Gen 2 R1T Tri",3]]
432-
if (roamerVehicleBreakdown) {
433-
try {
434-
const bd = typeof roamerVehicleBreakdown === 'string' ? JSON.parse(roamerVehicleBreakdown) : roamerVehicleBreakdown;
435-
if (Array.isArray(bd) && bd.length > 0) {
436-
const bdParts = bd.map(entry => Array.isArray(entry) ? entry[1] + ' ' + entry[0] : '');
437-
extraParts.push(bdParts.filter(Boolean).join(', '));
438-
}
439-
} catch (e) { /* ignore parse errors */ }
440-
}
441430
if (extraParts.length > 0) {
442431
roamerInfoBtn.dataset.tooltipExtra = extraParts.join(' · ');
443432
}

0 commit comments

Comments
 (0)