Preserve legend selections across metric changes - #746
Open
cquil11 wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cquil11
force-pushed
the
fix/persist-legend-selection
branch
from
August 16, 2026 20:07
b94daa6 to
1600fdd
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1600fdd. Configure here.
Preserve manual legend subsets when switching Y-axis metrics or X-axis modes. Refresh metric-aware Best per SKU selections automatically, including unofficial-run overlays, and add regression coverage.
cquil11
force-pushed
the
fix/persist-legend-selection
branch
from
August 16, 2026 20:14
1600fdd to
4868850
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Best per SKUwinners when the selected metric changes.?unofficialrun=overlay behavior aligned.Root cause
The legend reset key included axis controls, so every metric change reset manual selections. Removing those controls exposed a separate automatic-mode requirement:
Best per SKUis metric-aware and must still refresh when the axes change. The implementation now treats manual and automatic selections independently.Verification
bun run fmtbun run lintbun run typecheckbun run test:unit(3,922 tests)Note
Medium Risk
Changes inference legend state logic across context and overlay mode; behavior is nuanced but covered by expanded Cypress and unit tests rather than security-critical paths.
Overview
Legend hardware selection no longer resets when you change the Y-axis metric or X-axis mode. The reset key in
InferenceContextnow only tracks model, sequence, precision, and official vs unofficial scope—not axis controls—so manual hide/show subsets survive metric switches.When Best per SKU stays enabled, winners still recompute for the new axes (metric-aware Pareto), including official series and unofficial overlay series in
ScatterGraph. If no series is scoreable, selection falls back to the full in-scope set.Overlay legend edits (toggle or remove while
?unofficialrun=is loaded) turn off Best per SKU viasetBestPerSku(false, { applySelection: false })so the restored officialactiveHwTypeswhen the overlay is dismissed are not overwritten.Cypress and unit tests cover metric-change persistence, Best per SKU refresh, and overlay behavior.
Reviewed by Cursor Bugbot for commit 4868850. Bugbot is set up for automated code reviews on this repo. Configure here.