Skip to content

Fix: Prevent OBD signal merging, preserve distinct metrics, and cache definitions#147

Merged
tzebrowski merged 4 commits into
mainfrom
feat/rework-signals-importing
Apr 22, 2026
Merged

Fix: Prevent OBD signal merging, preserve distinct metrics, and cache definitions#147
tzebrowski merged 4 commits into
mainfrom
feat/rework-signals-importing

Conversation

@tzebrowski
Copy link
Copy Markdown
Owner

Overview

This PR fixes a critical data parsing bug where distinct telemetry signals (e.g., "Boost Target" and "Boost Measured") were being incorrectly merged into a single generic chart series (e.g., "Boost"). It also introduces a caching layer to improve application load times.

What Changed

  • Fixed Signal Squashing: Updated SignalRegistry.#mergeMetadata to preserve the full, exact English descriptions from the OBD JSON files by replacing newlines with spaces (instead of splitting and truncating).
  • Removed Greedy Regex: Removed the aggressive substring matching in SignalRegistry.getCanonicalKey() that was causing the UI to collapse specific names back into generic buckets.
  • Refactored DataProcessor: Removed all temporary monkey-patches, hardcoded language checks, and collision workarounds from DataProcessor.#normalizeColumnarJSON. It now cleanly maps PIDs directly to their specific English translations.
  • Performance / Caching: Added a 7-day localStorage cache (TTL) to SignalRegistry.init() so the app no longer downloads the large definition dictionaries on every single page load.

Implement 7-day `localStorage` caching in `SignalRegistry.init()` to prevent fetching OBD dictionaries on every page load.
@github-actions
Copy link
Copy Markdown

Coverage after merging feat/rework-signals-importing into main will be

89.95%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   alert.js95.65%88.89%100%100%19
   analysis.js89.86%80.65%85.29%96.40%114, 124, 137, 15, 18, 187, 216–217, 22, 229, 23, 32, 39, 47, 90, 94
   bus.js94.59%75%100%100%36, 39
   chartmanager.js76.72%62.66%81.61%84.38%1022–1023, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1027–1028, 103, 1034–1035, 1038–1039, 1041–1042, 1044–1045, 1048–1049, 1051, 1054, 1074–1075, 108, 1081–1082, 1082, 1082–1084, 109, 1097, 1108, 1129, 1150, 1184–1185, 119, 157–158, 168, 172, 175–176, 182–185, 185, 185–186, 186, 186–187, 220, 226, 278, 281, 286, 289, 293, 303–304, 304, 308, 347, 354, 362, 362–364, 38, 391, 554, 559, 563, 578, 582, 59, 601–604, 606, 613, 624, 63, 632–633, 642, 647, 65, 656, 66, 663, 668, 68, 68, 68, 682–683, 683, 683–684, 684, 684, 686, 69–70, 703, 705, 71, 73, 736, 738, 74, 74, 74–76, 76, 76, 766, 769, 77, 77, 796–797, 80–83, 837, 840, 843, 845–846, 858, 86, 861, 863–865, 874–875, 888–889, 89, 894, 90, 90, 90, 909, 91, 910, 910, 910, 913–914, 914, 914–915, 918, 918, 92, 92, 92, 92, 92, 920, 928–929, 929, 929, 93, 930, 933–934, 934, 934–935, 938, 938, 94, 940, 949, 95, 959, 96, 960–961, 967, 978–979
   config.js77.78%100%0%83.33%35
   dataprocessor.js88.11%79.20%91.67%93.85%128, 128, 128, 131–132, 135, 168, 170–171, 176, 181–182, 193, 206, 213, 220, 226, 250, 253, 272, 276, 282–283, 289, 294, 301, 304, 310, 38, 62–64, 67, 73–76
   dbmanager.js84.13%57.50%85.71%100%108–110, 116, 122–124, 132–134, 29, 33, 56–57, 71, 95–96
   debounce.js100%100%100%100%
   drive.js86.81%74.65%93.62%92.98%126, 137, 143, 162, 194, 203–204, 210–212, 212, 212–213, 217, 224, 224, 224–225, 227, 227, 227, 229–231, 233, 244, 251, 272, 278, 293, 304, 317, 324–325, 335, 345, 348, 355, 361–363, 382, 409, 437, 442, 480, 487, 537, 539, 546, 74–75
   histogram.js85.71%71.43%72.73%96.97%101, 113, 125, 129, 142, 145, 148, 154, 17, 28, 33, 33, 73, 77
   mapmanager.js79.29%65.55%75.76%89.05%102, 106, 106, 106–107, 109–110, 110, 110–112, 130–134, 148, 150, 153–155, 19, 208–209, 209, 28, 286–287, 291, 297, 31, 339, 343, 360, 372, 38, 412, 416, 424, 435, 443, 448, 452, 456–457, 46, 461–462, 483, 488–491, 491, 491, 491, 491–492, 495–496, 500, 509, 515, 517, 521, 524, 532, 535, 538–540, 546–547, 547, 547, 547, 547–548, 555, 563, 569, 578, 587, 611, 621, 624, 636, 642, 642, 650, 657, 657–658, 668, 719, 72, 72, 72, 721, 723, 73–74, 77, 83–85, 87, 91, 91, 91–94, 94, 94, 94, 94, 94–96
   mathchannels.js80.88%70.08%84.91%86.25%100–101, 106, 117, 123, 129–131, 138, 16, 184, 184–185, 188, 197–198, 207, 207, 22, 220, 224, 243–244, 25, 264, 281, 290, 290, 290–295, 297–299, 301, 303, 307, 32, 320, 329, 329, 33, 338–340, 340, 340, 340, 340–343, 347, 363, 369, 372–373, 378, 389, 39, 390, 395, 407, 424, 430–431, 450, 450, 454, 461, 467–471, 482–484, 486–488, 490–494, 497–499, 531, 56, 599, 606, 609, 612, 616, 623, 636–637, 648, 650–651, 67, 670, 688–689, 691, 698, 70, 720, 727, 736–738, 763–765, 77, 80, 800, 81, 827, 84, 842, 853, 857, 857,

@github-actions
Copy link
Copy Markdown

Coverage after merging feat/rework-signals-importing into main will be

89.94%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   alert.js95.65%88.89%100%100%19
   analysis.js89.86%80.65%85.29%96.40%114, 124, 137, 15, 18, 187, 216–217, 22, 229, 23, 32, 39, 47, 90, 94
   bus.js94.59%75%100%100%36, 39
   chartmanager.js76.72%62.66%81.61%84.38%1022–1023, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1027–1028, 103, 1034–1035, 1038–1039, 1041–1042, 1044–1045, 1048–1049, 1051, 1054, 1074–1075, 108, 1081–1082, 1082, 1082–1084, 109, 1097, 1108, 1129, 1150, 1184–1185, 119, 157–158, 168, 172, 175–176, 182–185, 185, 185–186, 186, 186–187, 220, 226, 278, 281, 286, 289, 293, 303–304, 304, 308, 347, 354, 362, 362–364, 38, 391, 554, 559, 563, 578, 582, 59, 601–604, 606, 613, 624, 63, 632–633, 642, 647, 65, 656, 66, 663, 668, 68, 68, 68, 682–683, 683, 683–684, 684, 684, 686, 69–70, 703, 705, 71, 73, 736, 738, 74, 74, 74–76, 76, 76, 766, 769, 77, 77, 796–797, 80–83, 837, 840, 843, 845–846, 858, 86, 861, 863–865, 874–875, 888–889, 89, 894, 90, 90, 90, 909, 91, 910, 910, 910, 913–914, 914, 914–915, 918, 918, 92, 92, 92, 92, 92, 920, 928–929, 929, 929, 93, 930, 933–934, 934, 934–935, 938, 938, 94, 940, 949, 95, 959, 96, 960–961, 967, 978–979
   config.js77.78%100%0%83.33%35
   dataprocessor.js88.11%79.20%91.67%93.85%128, 128, 128, 131–132, 135, 168, 170–171, 176, 181–182, 193, 206, 213, 220, 226, 250, 253, 272, 276, 282–283, 289, 294, 301, 304, 310, 38, 62–64, 67, 73–76
   dbmanager.js84.13%57.50%85.71%100%108–110, 116, 122–124, 132–134, 29, 33, 56–57, 71, 95–96
   debounce.js100%100%100%100%
   drive.js86.81%74.65%93.62%92.98%126, 137, 143, 162, 194, 203–204, 210–212, 212, 212–213, 217, 224, 224, 224–225, 227, 227, 227, 229–231, 233, 244, 251, 272, 278, 293, 304, 317, 324–325, 335, 345, 348, 355, 361–363, 382, 409, 437, 442, 480, 487, 537, 539, 546, 74–75
   histogram.js85.71%71.43%72.73%96.97%101, 113, 125, 129, 142, 145, 148, 154, 17, 28, 33, 33, 73, 77
   mapmanager.js79.29%65.55%75.76%89.05%102, 106, 106, 106–107, 109–110, 110, 110–112, 130–134, 148, 150, 153–155, 19, 208–209, 209, 28, 286–287, 291, 297, 31, 339, 343, 360, 372, 38, 412, 416, 424, 435, 443, 448, 452, 456–457, 46, 461–462, 483, 488–491, 491, 491, 491, 491–492, 495–496, 500, 509, 515, 517, 521, 524, 532, 535, 538–540, 546–547, 547, 547, 547, 547–548, 555, 563, 569, 578, 587, 611, 621, 624, 636, 642, 642, 650, 657, 657–658, 668, 719, 72, 72, 72, 721, 723, 73–74, 77, 83–85, 87, 91, 91, 91–94, 94, 94, 94, 94, 94–96
   mathchannels.js80.88%70.08%84.91%86.25%100–101, 106, 117, 123, 129–131, 138, 16, 184, 184–185, 188, 197–198, 207, 207, 22, 220, 224, 243–244, 25, 264, 281, 290, 290, 290–295, 297–299, 301, 303, 307, 32, 320, 329, 329, 33, 338–340, 340, 340, 340, 340–343, 347, 363, 369, 372–373, 378, 389, 39, 390, 395, 407, 424, 430–431, 450, 450, 454, 461, 467–471, 482–484, 486–488, 490–494, 497–499, 531, 56, 599, 606, 609, 612, 616, 623, 636–637, 648, 650–651, 67, 670, 688–689, 691, 698, 70, 720, 727, 736–738, 763–765, 77, 80, 800, 81, 827, 84, 842, 853, 857, 857,

@tzebrowski tzebrowski merged commit 6d87429 into main Apr 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant