Repository navigation
fix(docs): load the live demo locally and explain when it is missing - #1164
Merged
Merged
Conversation
…sing docusaurus start does not map /demo/viewer to viewer.html, so the local demo showed the site's 404 page in the frame. The frame now loads viewer.html. Before it opens, a HEAD request checks that the demo is built. If not, the preview stays and a message gives the build steps in dev, or links to the Marketplace on the site.
lcottercertinia
approved these changes
Oct 8, 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.
📝 PR Overview
The homepage live demo never loaded under
docusaurus start, even afterbuild:demo. The frame asked for/demo/viewer, which GitHub Pages anddocusaurus servemap toviewer.html, but the dev server does not. When the demo files are missing, the server still answers200with the site's own page, so the frame showed a 404 page and no reason.The frame now loads
viewer.html, which works on all three servers. Before it opens, a check confirms the demo is built. If it is not, the preview image stays and a message says what to do.🛠️ Changes made
/demo/viewer.html- the dev server does not map an extension-less path to a file.HEADrequest todemo/settings.jsonmust return JSON before the demo opens - a missing file returns the site's HTML page with200, so the status alone cannot tell.role="status"message replaces the button. It does not time out, so no one misses it.pnpm build, thenpnpm --filter docs-site build:demo, and reload."🧩 Type of change (check all applicable)
📷 Screenshots / gifs / video [optional]
N/A
🔗 Related Issues
related #1140
✅ Tests added?
📚 Docs updated?
🧪badge — see RELEASING.md)Anything else we need to know? [optional]
pnpm lintandpnpm exec jest --selectProjects docs(31 tests, 3 new) pass. The new tests cover the dev message, the site message on an HTML answer, and the site message on a network error. With the content-type check removed, the 2 HTML-answer tests fail.pnpm build,pnpm --filter docs-site build:demo,pnpm --filter docs-site start, then click Open demo. To see the fallback, movelana-docs/static/demoaway and click it again.