Skip to content

fix(frontend): retry built-in CODE cold starts and show startup status in Office viewer#5705

Open
joshtrichards wants to merge 2 commits into
mainfrom
jtr/fix-builtIn-CODE-UX
Open

fix(frontend): retry built-in CODE cold starts and show startup status in Office viewer#5705
joshtrichards wants to merge 2 commits into
mainfrom
jtr/fix-builtIn-CODE-UX

Conversation

@joshtrichards
Copy link
Copy Markdown
Member

@joshtrichards joshtrichards commented May 29, 2026

  • Resolves: # (likely various bug and trouble reports; improves UX with Built-in CODE)
  • Target version: main

Summary

Improve the Nextcloud Office frontend experience when using the built-in CODE server during cold start.

Previously, opening a document against the built-in CODE proxy could fail too quickly during startup:

  • checkProxyStatus() only retried a few times
  • retries happened almost immediately
  • users could remain stuck on the generic loading overlay and often had to retry manually

This change makes the frontend treat built-in CODE startup as a normal temporary state:

  • poll the proxy status endpoint for longer during cold start
  • retry at a controlled interval instead of using a tiny fixed retry count
  • keep the Office loading overlay visible while waiting
  • show a more accurate loading message when the built-in CODE server is starting

User impact

When the built-in CODE server is cold-starting, users should now see:

  • a more accurate message: "Starting the built-in CODE server …"
  • automatic waiting/retry behavior
  • fewer cases where reopening the document manually is required

Changes

src/services/collabora.js

  • replace the global retry-counter approach in checkProxyStatus()
  • switch to a time-based polling loop
  • keep polling while proxy status is starting, stopped (i.e. not yet started), or restarting
  • tolerate transient request/network failures throughout the polling window
  • fail only after a defined overall timeout
  • preserve explicit failure when the proxy reports error

src/view/Office.vue

  • show a dedicated loading message while waiting for the built-in CODE server to become ready
  • clear that loading message once proxy readiness succeeds
  • keep the existing failure path if startup ultimately times out or configuration is invalid
  • fix inconsistent indentation in the Insert_Button block

Notes

Testing

Suggested manual verification:

  1. Use a setup with the built-in CODE server enabled
  2. Ensure the CODE process is not already running
  3. Open a document
  4. Confirm the UI shows the startup message while the server warms up
  5. Confirm the document opens automatically once the proxy reports OK
  6. Confirm true startup failures still surface an error state

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

Signed-off-by: Josh <josh.t.richards@gmail.com>
…xy readiness

Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant