Repository navigation
[stable35] fix: show when the page has stopped hearing from the server - #1131
Merged
Merged
Conversation
Both composables handled their errors and then threw the result away. useStaticData computed `loading` and `error`, but SettingsAdmin destructured only `data`, so both flags were dead code; useLiveData's catch block was empty by design. Every failure therefore looked the same from the outside, and none of them looked like a failure: - a failed /data request left the pulsing skeletons on screen forever, with no error, no explanation and no way to retry short of reloading - a server that had been unreachable for an hour was still polled every two seconds, with the charts showing their last values and nothing saying those values had stopped moving For a page whose whole job is to report the health of the server, quietly showing stale numbers or a loading animation is the worst of the available failure modes: it looks healthy. A failed /data request now says so and offers to try again. Once two polls in a row have failed -- one is usually a blip worth riding out -- a warning names the time the values were last current. The values themselves stay on screen, which is still the right call; what changes is that the page no longer implies they are live. Polling now also backs off while requests are failing, doubling up to a minute and returning to normal on the first success, so a server that is struggling is not asked for the same numbers thirty times a minute. Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com> Assisted-by: Claude Code:claude-opus-5 Co-Authored-By: Claude Opus 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.
Manual backport of #1122