Skip to content

Commit 81d2630

Browse files
authored
Merge pull request #252 from RivianTrackr/claude/update-rivian-roamer-schema-iAP9F
Claude/update rivian roamer schema i ap9 f
2 parents aa049e0 + 74b236f commit 81d2630

6 files changed

Lines changed: 25 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@ All notable changes to the Rivian Tire Guide plugin will be documented in this f
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

7+
## [1.44.2] - 2026-04-08
8+
9+
### Fixed
10+
- **Vehicle breakdown not showing in tooltip** — The row sanitizer (`validateAndSanitizeCSVRow`) was stripping double quotes from all string cells, turning the JSON `[["Gen 1 R1T Dual",1]]` into unparseable `[[Gen 1 R1T Dual,1]]`. The vehicle_breakdown field (index 27) is now excluded from quote stripping.
11+
- **Sync silently failing without vehicle_breakdown column** — The sync now ensures the `roamer_vehicle_breakdown` column exists before writing, so UPDATEs don't fail silently on sites where dbDelta missed it.
12+
- **Wrong insert_tire format types** — Fixed misaligned `$formats` array in `insert_tire()` after the `roamer_session_count` removal shifted column positions.
13+
14+
### Changed
15+
- **Plugin version** — Bumped to 1.44.2.
16+
717
## [1.44.1] - 2026-04-08
818

919
### Fixed
10-
- **Vehicle breakdown not displaying** — Fixed parsing of the Roamer feed's `vehicle_breakdown` field which uses an array-of-pairs format (`[["Gen 1 R1T Dual", 1]]`) rather than an object. Tooltip, admin tire edit, and multi-assign merge logic all updated.
20+
- **Vehicle breakdown feed format** — Fixed parsing of the Roamer feed's `vehicle_breakdown` field which uses an array-of-pairs format (`[["Gen 1 R1T Dual", 1]]`) rather than an object. Tooltip, admin tire edit, and multi-assign merge logic all updated.
1121
- **Vehicle breakdown column not created** — The `roamer_vehicle_breakdown` TEXT column could fail to be created by dbDelta on MySQL < 8.0.13 (TEXT columns don't support DEFAULT values). Added migration 14 as a safety net to explicitly create the column via ALTER TABLE.
1222

1323
### Changed

frontend/js/modules/validation.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,15 @@ export function validateAndSanitizeCSVRow(row) {
211211
const cell = row[i];
212212

213213
if (typeof cell === "string") {
214-
sanitized[i] = cell.replace(/[<>\"'&]/g, "").trim();
214+
// Index 27 (vehicle_breakdown) contains JSON — preserve quotes.
215+
if (i === 27) {
216+
sanitized[i] = cell;
217+
} else {
218+
sanitized[i] = cell.replace(/[<>\"'&]/g, "").trim();
215219

216-
if (sanitized[i].length > 500) {
217-
sanitized[i] = sanitized[i].substring(0, 500);
220+
if (sanitized[i].length > 500) {
221+
sanitized[i] = sanitized[i].substring(0, 500);
222+
}
218223
}
219224
} else if (typeof cell === "number") {
220225
if (i === 6) {

frontend/js/rivian-tires.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rivian-tire-guide",
3-
"version": "1.44.1",
3+
"version": "1.44.2",
44
"private": true,
55
"description": "Interactive tire guide for Rivian vehicles — WordPress plugin",
66
"scripts": {

rivian-tire-guide.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: Rivian Tire Guide
44
* Description: Interactive tire guide for Rivian vehicles with filtering, comparison, and ratings.
5-
* Version: 1.44.1
5+
* Version: 1.44.2
66
* Author: RivianTrackr
77
* Text Domain: rivian-tire-guide
88
* Requires at least: 5.8
@@ -13,7 +13,7 @@
1313
exit;
1414
}
1515

16-
define( 'RTG_VERSION', '1.44.1' );
16+
define( 'RTG_VERSION', '1.44.2' );
1717
define( 'RTG_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
1818
define( 'RTG_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
1919
define( 'RTG_PLUGIN_FILE', __FILE__ );

0 commit comments

Comments
 (0)