Repository navigation
Wait for the panel to load in the sidebar, and say when it cannot - #47
Merged
Merged
Conversation
…y when it cannot While Home Assistant starts, a panel is in setup retry, or the connection is lost, every sidebar view now shows the waiting line instead of an error, an "off" monitoring status or "No circuits found", and draws once the entry loads. A panel whose entry failed to set up or is disabled says so, in the card and the sidebar, where both used to wait or fail without saying why. The entry-state rules live in one shared module (core/entry-load.ts), which the card and the sidebar both use. Paths that no production state reaches are removed: the panel list's refusal path, test-only subscription-failure handlers, and render-supersede checks that the one-at-a-time scheduler makes unreachable.
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.
What
The sidebar dashboard now behaves the way the card does since #46. While Home Assistant starts, a panel is in setup retry, or the connection is lost, every view waits and draws once the panel's entry loads. A panel whose entry failed to set up or is disabled says so, in the card and in the sidebar.
Changes
core/entry-load.ts): loading (not_loaded,setup_in_progress,setup_retry,unload_in_progress), loaded, setup failed (setup_error,migration_error,failed_unload), or disabled. Failure states and a disabled entry show an alert saying where to fix it, and the panel still draws when the entry loads, as after a reauth.config_entries/subscribestatuses now carrydisabled_by.hassor after a lost connection, and waits out a lost connection with no retries or toast.no_dataas a wait;superseded()render check, since tab renders run one at a time;dist/is rebuilt in its own commit.Changelog (0.12.1, Fixed)
Tests
tests/span-panel-entry-wait.test.tsandtests/entry-load.test.tscover each view across each waiting refusal and entry state: drawing on load and on a reconnect re-seed, removal, panel and tab switches, the Favorites removal race, and the Adopted detach.npm test: 1812 passed, exit 0, no unhandled errors. Lint, typecheck and i18n validation are clean.