Skip to content

Run HTML preview JavaScript in the desktop app - #78

Merged
yannelli merged 1 commit into
mainfrom
fix/html-preview-native
Oct 13, 2026
Merged

yannelli merged 1 commit into
mainfrom
fix/html-preview-native

Conversation

@yannelli

Copy link
Copy Markdown
Owner

The desktop window's navigation filter allowed only app blob URLs, so it cancelled the oxbit-preview:// frame that runs HTML preview JavaScript. A trusted folder showed a blank preview with no notice, and Run JavaScript left the frame blank. The main and panel windows now allow the oxbit-preview scheme, which serves only the static preview shell.

Summary

  • apps/desktop/src-tauri/src/main.rs: preview_url accepts oxbit-preview URLs; the unit test covers the shell URL.
  • tests/desktop/workbench.e2e.mjs: a native WebView test trusts a folder, opens an HTML preview, and waits for the page's script to post to the app.

Checks

  • Native WebView test on macOS: fails on main ("The preview page's script did not run") and passes with this change. The other native tests in that file failed locally at the close dialog with and without this change.
  • cargo fmt --check, cargo clippy --all-targets -D warnings, cargo test preview_tests, eslint on the test file.
  • iOS has no navigation filter and loads the same shell; I did not run it on a device.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
oxbit 746789c Commit Preview URL

Branch Preview URL
Oct 13 2026, 12:25 PM

@yannelli
yannelli merged commit 2f16e84 into main Oct 13, 2026
8 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