Latest Results
fix(benchmarks-website): tooltip snaps to one commit and diffs vs predecessor
Two bugs in the tooltip after LTTB downsampling:
1. Hovering between two LTTB-kept points showed stats for *both*
commits. `mode: "x"` returns every dataset element whose
`pointHitRadius` (8px) overlaps the cursor, and on a chart with
~500 columns spread over ~600px the kept points sit ~1.2px apart,
so a cursor between two columns intersects both — the rendered
tooltip got rows for series A at column X *and* column Y, which
reads as duplicate / mixed data.
2. The per-series `±X.0%` label was wrong. The previous attempt at
"compare against the previous commit" walked toward higher indices
in `rawData`. But the SQL is `ORDER BY c.timestamp` ASC, so
higher index = newer commit, i.e. the chronological *successor*,
not the predecessor. Walk in the other direction.
Both fixes:
- `interaction.mode` flips from `"x"` to `"nearest"` (with
`axis: "x"`, `intersect: false`). That returns exactly one closest
data point regardless of column packing, so `tt.dataPoints[0].dataIndex`
is unambiguously the single hovered commit.
- The external tooltip handler stops mapping over `tt.dataPoints` and
iterates `chart.data.datasets` itself, building one row per series at
the chosen commit (skipping hidden datasets and ones with null
`rawData[idx]`). One row per series, period.
- Each row's predecessor walk now goes `idx - 1, idx - 2, …` —
toward the chronologically earlier commit — and the `(current -
predecessor) / predecessor` direction matches what users read
as "this commit changed by X% from the one before it".
- Drop the now-dead `tooltip.itemSort` config; the handler sorts
rows itself by current y-value descending so the top-to-bottom
order matches the visual stack of lines at the hovered x.
- Refuse to flash an empty popup: if every series was hidden or
null at this commit, set `host.style.opacity = "0"` and bail.
Bumps `STATIC_ASSET_VERSION` to `bench-v3-ui-15`; refreshes
snapshots for the JS asset URL only — no markup change.
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>claude/benchmarks-v3-full-history Latest Branches
-25%
-42%
+10%
claude/benchmarks-v3-full-history © 2026 CodSpeed Technology