feat(ui): persist JobLossGraph settings per job + fix chart height on control toggle#841
Open
MarcBate wants to merge 2 commits into
Open
feat(ui): persist JobLossGraph settings per job + fix chart height on control toggle#841MarcBate wants to merge 2 commits into
MarcBate wants to merge 2 commits into
Conversation
… toggle - Persist display toggles (Smoothed, Raw, Log Y, Clip outliers), smoothing, plot stride, series enabled state, and x-axis zoom range to localStorage keyed by job ID (loss-graph:<id>), so settings are restored when returning to a job's loss graph. - Fix chart canvas height jumping when Display buttons are clicked: defer the post-creation setSize() call to requestAnimationFrame so the browser has completed layout and the legend's rendered height is accurate. - Restore saved zoom range after chart recreation (e.g. after toggling a display option), and clear it cleanly on Reset zoom. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Initialise isZoomed from saved settings so the button is visible on first render, not only after the chart's setScale hook fires. - Skip setIsZoomed(false) after chart creation when a zoom range will be restored, avoiding a flicker where the button momentarily disappears. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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
localStoragekeyed by job ID (loss-graph:<id>). Settings are restored automatically when navigating back to a job's loss graph.setSize()call is now deferred torequestAnimationFrameso the browser completes layout before the legend height is measured, matching the behaviour of the existingResizeObserverpath.Test plan
🤖 Generated with Claude Code