feat(inference): rework point-label toggle and default line labels on#474
Conversation
- Rename the "Hide Labels" toggle to "Labels" and invert it: off by default now means point labels are hidden; turning it on shows them. State renamed hidePointLabels -> showPointLabels; URL param i_nolabel -> i_label (=1 shows labels). - Enable "Line Labels" by default. URL encodes the non-default OFF state as i_linelabel=0 (on, the default, is stripped from share links). - Turning "Parallelism Labels" on now auto-enables "Labels" if it's off, so the parallelism text actually renders instead of being hidden. Applied to both the latency Scatter chart and the GPU chart, including the unofficial-run overlay label path. Updated mock context, the line-labels e2e specs (default-on + i_linelabel=0 coverage), and docs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude all url params changes must be backwards compatible. Make sure your change is, because it looks like it isn't. |
|
Claude finished @adibarra's task in 7m 12s —— View job Backwards-compat fix pushedYou were right — two explicit URL params broke after the rename. Fixed in
Changes
Scope noteThis fix covers explicit URL params. The PR also flips the defaults (point labels off, line labels on) — which means old share links that had no label params will render slightly differently in the new code (old default = point on / line off vs new default = point off / line on). Without a versioning marker we can't distinguish a fresh new link from a legacy default-state link, so this default flip is left in place as the PR's intended UX change. If you want it preserved too, the cleanest path is to keep the old defaults ( Verified
Tasks
|
…s working - Re-add `i_nolabel` as a read-only legacy alias so pre-rename share links explicitly hide point labels (survives future default changes). - Hydrate `showPointLabels=true` when `?i_advlabel=1` is present and `?i_nolabel=1` is not, mirroring the toggle's auto-enable side-effect so parallelism labels actually render on legacy links. - Add Cypress coverage for the three URL combinations. Co-authored-by: Alec Ibarra <adibarra@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9c5ea62. Configure here.
| selectedDates, | ||
| selectedDateRange, | ||
| hideNonOptimal, | ||
| hidePointLabels, |
There was a problem hiding this comment.
Legacy i_nolabel poisons share URLs
Medium Severity
After opening a link with legacy i_nolabel=1, turning point labels on writes i_label=1 but leaves the original i_nolabel=1 in share state. Hydration checks i_nolabel before i_label, so re-shared or reloaded links keep labels hidden despite the user enabling them.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 9c5ea62. Configure here.


Summary
Three related chart-label changes, applied to both the latency Scatter chart and the GPU chart:
"Hide Labels" → "Labels" (off by default). The toggle is renamed and its meaning inverted. Previously point labels were shown by default and "Hide Labels" hid them; now point labels are hidden by default and "Labels" shows them. State
hidePointLabels→showPointLabels."Line Labels" is now on by default. Date line labels render without any interaction.
Turning "Parallelism Labels" on auto-enables "Labels" if it's off. Parallelism labels are point labels, so without this they'd toggle on but stay invisible.
URL params
i_nolabel→i_label(=1shows point labels; default off, so absent = hidden).i_linelabelnow defaults on: the non-default OFF state is encoded asi_linelabel=0; the default-on state is stripped from share links. Existingi_linelabel=1links still work.Overlay support
Works for both official runs and
?unofficialrun=overlays — the overlay point-label render path (showLabels = showPointLabels && !showGradientLabels) was updated alongside the official path, and the line-label default applies uniformly to overlay rooflines.Testing
pnpm typecheck,pnpm fmt, lint on changed files, andpnpm test:unit(2417 tests) all pass.line-labels.cy.ts: default-on assertion, off→on round-trip, and newi_linelabel=0load coverage.showPointLabels) anddocs/state-ownership.md.🤖 Generated with Claude Code
Note
Low Risk
Chart display and URL param renames with explicit legacy read paths; no auth, data, or backend changes. Main risk is share-link edge cases, covered by new e2e tests.
Overview
Inference chart legends now treat point labels and line labels with clearer defaults and shareable URL semantics.
Point labels:
hidePointLabelsbecomesshowPointLabels(off by default). The legend switch is renamed from Hide Labels to Labels. Share links usei_label=1when labels are on;i_nolabel=1is still read on load but not written. Loadingi_advlabel=1without an explicit label flag turns Labels on so old parallelism-only links still show text;i_nolabel=1overrides that.Line labels: Default is on (
i_linelabelabsent); share URLs emiti_linelabel=0only when the user turns them off.i_linelabel=1remains valid.UI behavior: Enabling Parallelism Labels auto-enables Labels on scatter and GPU comparison charts when needed. Scatter overlay point labels follow the same
showPointLabelslogic.Docs (
state-ownership.md), Cypress (line-labels.cy.ts), and mocks are updated for the new defaults and legacy URL cases.Reviewed by Cursor Bugbot for commit 9c5ea62. Bugbot is set up for automated code reviews on this repo. Configure here.