Conversation
…ailure The widget's load() treated any fetch failure as Unreachable, with no fallback - a single blip (Wi-Fi handoff after screen-on, Doze, a brief server restart) blanked a working widget until the next update cycle, even though a manual reload right after would already succeed again. - Cache the last successfully-parsed loadpoint JSON per widget instance, tagged by which server+loadpoint it belongs to. On a background/periodic fetch failure, fall back to it if the tag matches the current config; reconfiguring to a different loadpoint naturally stops matching, so there's nothing to clear explicitly. - An explicit user action (reload tap, mode change) still reports Unreachable on failure rather than silently showing stale data - that one-shot flag is consumed by the very next load regardless of outcome, so it never leaks into a later background refresh. - Narrowed the recomposition trigger to (server, loadpoint, refresh nonce) instead of the whole Preferences blob, since load() now writes the cache into that same blob on success and a broader key would treat that write as "config changed" and reload again.
Contributor
Author
|
@naltatis What do you think ? |
This was referenced Sep 11, 2026
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.
Follow-up to #255.
The loadpoint widget's fetch had no fallback: any failure, including a single transient one (Wi-Fi handoff right after screen-on, Doze, a brief server restart), replaced the card with "Server unreachable" until the next update cycle - even though a manual reload moments later would already succeed again.
NoData(server reachable, nothing at that index) is untouched - that's a real answer from a reachable server, not a network problem, and showing old data there would be misleading.