Repository navigation
馃馃馃 Restore disabled chart entities after refresh - #81
Merged
Merged
Conversation
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
Refreshing a page with disabled entities restores the target rows, but the chart renders those entities because
setConfigruns before the inner chart exists. Seed its saved visibility when the card first mounts; keep later redraws from overwriting user interactions.configure card before mount store saved hidden entities mount inner chart + apply saved chart view state draw historyIncludes a regression spec, a Storybook interaction scenario, and the rebuilt bundle.
Evidence
expected false to be true). Chrome DevTools on the supplied HA URL showed five disabled entities in the card but an empty hidden-entity set in the chart.After: 68 focused unit tests and all 5 history-card stories pass. Temporarily applying the missing initial view state in the authenticated HA browser correctly hides all five entities. A browser replay of the captured HA history payload with configuration set before mounting draws exactly the two enabled temperature series and only the enabled sauna-door row. Disabling the mount fix reproduces five temperature series and an extra heating row. The running HA card still has no
_syncChartViewState, so the built bundle has not been deployed to HA.pnpm build,pnpm sb:build,pnpm format,pnpm lint:types, andpnpm lintpass.Merge Danger
Door: Two-way
Blast Radius: History
Initial saved chart view state only. Ordinary renders preserve live visibility changes.