Skip to content

fix(browser): restore remote HTML site routes and navigation - #3595

Merged
bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/fix-html-preview-site-routing
Oct 29, 2026
Merged

bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/fix-html-preview-site-routing

Conversation

@bobleer

@bobleer bobleer commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Opening a nested website build such as website/dist/index.html exposed the workspace path to its client router, producing the website's own 404. Navigating or refreshing /evaluation then failed with Preview resource not found because the HTTP gateway only served literal files.

Open selected index.html / index.htm documents at / and use that entry for missing extensionless document navigations. SSH workspaces and Desktop/CLI Peer Device previews share this controller-side behavior.

Type and Areas

Type: bug fix

Areas: Desktop HTML preview gateway, encrypted Relay regression, native browser acceptance, owning guides

Motivation / Impact

  • Canonicalize entry-file links to the site root, preserving queries. Continue using workspace-relative URLs for other standalone HTML filenames.
  • Give real files and directory indexes priority. Only HTML document navigation may fall back to the selected index. Missing images/scripts, explicit filenames, non-document fetches, offline owners, authorization errors and invalid paths retain their resource errors.
  • Preserve existing cache bounds, query invalidation, ownership checks and cancellation. Routing uses the existing v1 entry request without a new command, wire field, capability or target-side change.
  • Add native coverage for first opening, actual link navigation, history-route reload, deep links, images and a missing-image 404. Extend the encrypted peer regression with site routing and image reads through an unchanged v1 provider.

Verification

Passed locally:

  • Reproduced both reported 404s in the native macOS browser against the actual Linux SSH workspace and its deployed website build before the fix.

  • cargo test --locked -p openbitfun-desktop --lib site_index_opens_at_root_and_document_routes_reuse_the_entry failed on the original gateway because bootstrap exposed the workspace-prefixed entry URL.

  • cargo test --locked -p openbitfun-desktop --lib html_preview — 14 passed, 1 opt-in benchmark ignored; includes encrypted Relay and unchanged v1 target compatibility.

  • pnpm run fmt:rs, pnpm run build:web, cargo build --locked -p openbitfun-desktop, node --check tests/e2e/scripts/run-html-preview.mjs, and git diff --check passed.

  • node tests/e2e/scripts/run-html-preview.mjs passed on the native macOS browser, including visible-view image animation, initial site route, link navigation, reload, query-bearing deep link and missing-image 404.

  • A separate native acceptance run against the actual Linux SSH workspace passed first open, all image decodes, evaluation-page navigation/reload and direct docs navigation. The visible-view screenshot confirms the homepage hero image paints correctly; the initial hidden test view had frozen its CSS entrance animation at opacity zero.

Final head 912c5f8ad4346f9a5a3a410b904d81081f504482 passed all executed CI checks, including all three Rust/CLI platforms, frontend build/tests and aggregate validation in CI run 40803497160. The two impact-selected jobs were skipped by existing workflow rules.

Reviewer Notes

AI-assisted change. Remote SSH workspace and encrypted Peer Device paths are tested separately. The peer fixture is an encrypted loopback Relay integration, not a physical two-device account test. Mobile/IM Remote Control and Detached Dispatch are unchanged and unexercised.

Index previews follow normal site-root URL resolution; ordinary named HTML documents retain workspace-relative ./ and ../ behavior. Existing preview-capable CLI/Desktop targets need no protocol upgrade. No persisted shape changes.

The reported homepage image files exist on the Linux host. The native SSH baseline successfully decoded both the hero image and the image loaded after scrolling. Post-fix visible-view acceptance also confirms image painting; no independent image-transfer failure was established.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer
bobleer merged commit cf3471d into openBitFun:main Oct 29, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant