Skip to content

fix: page list polling interval and failed page content fetches - #2947

Merged
mejo- merged 5 commits into
mainfrom
fix/offline_page_list
Nov 19, 2026
Merged

mejo- merged 5 commits into
mainfrom
fix/offline_page_list

Conversation

@mejo-

@mejo- mejo- commented Nov 17, 2026

Copy link
Copy Markdown
Member

📝 Summary

Fixes two bugs around offline state handling.

See commit messages for details.

  • fix(PageList): keep a single page list polling interval
  • fix(page): handle failed page content fetches

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

@mejo- mejo- self-assigned this Nov 17, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Nov 17, 2026
Comment thread src/components/Page/TextEditor.vue Resolved
Comment thread src/components/PagePrint.vue Resolved
Comment thread src/views/CollectiveView.vue Resolved
Comment thread src/mixins/pageContentMixin.js Resolved
Comment thread src/views/CollectiveView.vue Resolved
Comment thread src/components/Page/TextEditor.vue Resolved
Comment thread src/components/Page/TextEditor.vue Resolved
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 👀 In review in 📝 Productivity team Nov 18, 2026
@mejo-
mejo- force-pushed the fix/offline_page_list branch from 509d904 to a501c9b Compare November 18, 2026 14:50
The interval id was stored in `getPagesIntervalId` but checked and
cleared as `this.interval`, which was never set. Every offline/online
switch started another interval, and leaving the collective only
stopped the newest one.

With notify_push, the 15 minute rate was set when the session started
but not applied, so the page list was still polled every minute.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
`fetchPageContent()` returned `undefined` when the request failed, for
example while offline. Opening a page then threw a TypeError on
`trim()` and left an empty reader.

Return `null` instead. The editor keeps its previous content and only
opens empty pages in edit mode if their content was fetched.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
When the DAV request for a page or version fails, the print view
printed the page with an empty body and the version view showed an
empty version next to the restore button, without telling the user.

Mark failed pages in the print view with an error note so the gap is
visible in the preview and on paper, and show one error toast for all
failed pages. Show an error state in the version view and disable
restoring a version whose content could not be loaded.

The error is shown by each caller rather than in
`fetchPageContent()`, since the editor also refetches page content in
the background and keeps the previous content if that fails.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
A page whose content could not be fetched, e.g. when opened while
offline, showed an empty reader without any error. Nothing fetched the
content again once the network was back, as the page timestamp didn't
change, so the page looked empty until a reload.

Show the offline state (or an error if online) in place of the reader
and fetch the content again when the network comes back online.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
`setOffline` and `setOnline` each opened their own CDP session. Network
emulation applies per session, so `setOnline` fired the browser's
online event while requests stayed blocked by the session of
`setOffline` until the end of the test.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5

@max-nextcloud max-nextcloud left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing all the feedback! Looks good now.

@AndyScherzinger AndyScherzinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@mejo-
mejo- merged commit 2b87f67 into main Nov 19, 2026
62 checks passed
@mejo-
mejo- deleted the fix/offline_page_list branch November 19, 2026 09:07
@github-project-automation github-project-automation Bot moved this from 👀 In review to ☑️ Done in 📝 Productivity team Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

3 participants