Skip to content

fix: show when the page has stopped hearing from the server - #1122

Merged
kesselb merged 1 commit into
masterfrom
fix/visible-failures
Sep 9, 2026
Merged

kesselb merged 1 commit into
masterfrom
fix/visible-failures

Conversation

@karlitschek

Copy link
Copy Markdown
Member

Problem

Both composables handled their errors and then discarded the result.

useStaticData computed loading and error, but SettingsAdmin.vue destructured only data — so both flags were dead code. useLiveData's catch block was empty by design. Every failure therefore looked identical 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 the page
  • 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 entire job is reporting the health of a server, quietly showing stale numbers or a loading animation is the worst of the available failure modes: it looks healthy. An admin checking whether their server is alright would be reassured by a page that had lost contact with it.

Change

  • A failed /data request says so, and offers a Try again button that re-runs the request. The skeletons are no longer shown in that state, since nothing is loading.
  • Once two polls in a row fail — one is usually a blip worth riding out — a warning names the time the values were last current: "These values stopped updating at 17:15:42: the server is not responding." The values stay on screen, which is still the right call; what changes is that the page stops implying they are live.
  • Polling backs off while requests are failing, doubling from 2 s up to a minute and snapping back to normal on the first success, so a struggling server is not asked for the same numbers thirty times a minute.

Verification

Driven against a live NC 35 instance with Playwright, failing the requests at the network layer:

scenario result
/data fails from the start error card shown, skeletons gone, "The server information could not be loaded. Try again"
Try again clicked once the request is allowed through data loads normally
page loads cleanly 0 notices — no false positives
/update and /periodic start failing after a good load "These values stopped updating at 5:15:42 PM: the server is not responding."
request attempts during 20 s of failure 1, where the 2 s interval would have made ~10

Screenshots of both states are in the branch discussion below. eslint clean; js/ and css/ rebuilt and committed, and a second build is a no-op.

Note on overlap

This touches useLiveData.ts and SettingsAdmin.vue, so it will conflict textually with #1120 (which adds visibility gating to the same poller) and #1119 (which turns SettingsAdmin.vue into a shell). The changes are complementary rather than contradictory — I have them merged and running together on a test instance — so whichever lands first, I am happy to rebase the others onto it.

@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Sep 9, 2026
@karlitschek

Copy link
Copy Markdown
Member Author

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>
@kesselb
kesselb force-pushed the fix/visible-failures branch from e218595 to d01e78d Compare September 9, 2026 18:02
@kesselb
kesselb enabled auto-merge September 9, 2026 18:02
@kesselb
kesselb merged commit 611b0cf into master Sep 9, 2026
38 checks passed
@kesselb
kesselb deleted the fix/visible-failures branch September 9, 2026 18:02
@kesselb

kesselb commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

/backport to stable35 please

@backportbot

backportbot Bot commented Sep 9, 2026

Copy link
Copy Markdown

The backport to stable35 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable35
git pull origin stable35

# Create the new backport branch
git checkout -b backport/1122/stable35

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick d01e78d7

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1122/stable35

Error: Failed to check for changes with origin/stable35: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits backport-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants