Skip to content

fix(views): chart gradient ids survive any caller text; dashboard tables read cleanly - #2333

Merged
Makisuo merged 3 commits into
mainfrom
fix/charts-kit-correctness
Nov 7, 2026
Merged

Makisuo merged 3 commits into
mainfrom
fix/charts-kit-correctness

Merge branch 'main' of https://github.com/MapleTechLabs/maple into fi…

782c502
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 7, 2026 in 2m 39s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. Contained view-layer change: every gradient and its fill come from one builder, and the new formats are pinned by rendered-scene and string tests.
1 note · tests covered · risk medium

Routes every chart gradient id through a branded sanitizer, so a span name like GET (unmatched) no longer throws in the canvas painter, and formats unitless table cells instead of printing raw floats. Both behaviors are tested; one list-cell path is left unformatted.

  • gradientId keeps only [A-Za-z0-9_-] and appends a hash when it rewrites
  • verticalGradient now takes a branded GradientId
  • formatCell trims and groups unitless numbers via plainNumber
  • Lab gains a GET (unmatched) endpoint and a derived series

Before merge

  • Manual · Re-add preview:web once a slot frees, to see the prod sparkline id render on a preview

Findings

🔵 Note · F1 · Numeric items inside a list cell still print raw float noise

correctness · apps/web/src/page/dashboards/kit/tiles.ts:111

listCellText sends array items through cellText (tiles.ts:299), so a list column holding [0.30000000000000004, 1234567.891] still renders those exactly as they came, while the same value in a scalar cell now reads 0.3 and 1,234,567.89. The list tile is left half-formatted.

Map array items through `formatCell(item, unit)` in `listCellText` (keeping the empty-string case) so list cells format like table cells.
What was checked
  • Definition and fill ids agree in all ten chart definitions; url(# now survives only in gradient-id.ts
  • Every verticalGradient caller in the repo passes a branded id
  • Ran the Intl options in node: thresholds, 3-significant-digit branch and -0 behave as the tests pin

782c502 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

Annotations

Check notice on line 111 in apps/web/src/page/dashboards/kit/tiles.ts

See this annotation in the file changed.

@maple-review-bot maple-review-bot / Maple / review

correctness: Numeric items inside a list cell still print raw float noise

`listCellText` sends array items through `cellText` (`tiles.ts:299`), so a list column holding `[0.30000000000000004, 1234567.891]` still renders those exactly as they came, while the same value in a scalar cell now reads `0.3` and `1,234,567.89`. The list tile is left half-formatted.