State management: persistence, resets, and URL restore#185
Open
State management: persistence, resets, and URL restore#185
Conversation
App.jsx: - Lift supplementalMetrics from CompareView to App for persistence across Compare → Deep Dive → Compare transitions - Remove deepDiveConfigs snapshot — pass supplementalMetrics directly to DeepDiveView so it always reflects current state - Reset all compare/dive state on clear selection and new search (groupByList, hiddenFields, supplementalMetrics, deepDiveMetrics, deepDiveIterations, tableColumnOrder, tableHiddenDims) - Save deepDiveMetrics and deepDiveIterations in URL hash - Save iteration IDs (not run IDs) for precise selection restore - Save table column order and hidden dims in URL hash - Only encode compare/dive state when view is not search - Backward compatible: old URLs with selectedRuns still work CompareView.jsx: - Receive supplementalMetrics/setSupplementalMetrics as props - Remove useImperativeHandle (App has direct access) - Remove setSupplementalMetrics([]) from mount effect - Clear restoredMetrics after applying to prevent duplicate adds - Guard against duplicate supplemental metric entries - Fetch values for metrics hydrated from URL with empty values - Remove metric from deepDiveMetrics when deleting it DeepDiveView.jsx: - Add JSON.stringify(metricConfigsProp) to fetch effect dependency so changed breakout configs trigger re-fetch - Yield between sequential metric fetches for progressive rendering IterationTable.jsx: - Accept columnOrder/columnHidden props from App - Merge saved column order with computed dims on init: keep saved order for dims that still exist, append new, drop stale - Propagate reorder/hide changes to App via callbacks Co-Authored-By: Claude Opus 4.6 (1M context) <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
Test plan
🤖 Generated with Claude Code