Skip to content

Embeddable scene editor, frameos-wasm package, and wasm live preview#260

Merged
mariusandra merged 2 commits into
mainfrom
embedded-editor-wasm
Jul 15, 2026
Merged

Embeddable scene editor, frameos-wasm package, and wasm live preview#260
mariusandra merged 2 commits into
mainfrom
embedded-editor-wasm

Conversation

@mariusandra

Copy link
Copy Markdown
Collaborator

Summary

Split out of #257 (FrameOS Cloud link). The embedded scene editor and in-browser scene runtime:

frameos-editor npm package

  • Embeddable AGPL scene editor bundle (frameos/editor): serve it from any host, embed in an iframe, exchange scenes JSON over postMessage
  • Full scene workspace panels, theme support via init message, light-mode diagram styling, hashed entry files, demo page
  • Standalone embeds (no backend) answer API calls with synthetic 404s so offline fallbacks engage; auth-guard redirects use replace instead of push so Back does not loop

frameos-wasm npm package

  • Moved to frameos/wasm: typed wrapper around the emscripten wasm preview worker with a showIf-aware management interface (fields, event buttons, logs)
  • Preview HTTP goes client-side first, so the same-origin proxy only carries CORS-blocked hosts

Live preview polish

  • Renders keep unapplied form edits; one action row; "Save screenshot" in the Preview panel; event buttons send their label in the payload

Release plumbing

  • publish-npm workflow job (builds the wasm runtime with nim + emsdk, skips when the version exists on npm)
  • Per-package version sync in tools/update_versions.py; the editor gets its own component hash in versions.json

Note: the committed frontend/src/generated/builtinApps.ts snapshot embeds app sources that include changes from sibling PRs split out of #257 (#258's gallery error-image change). Once all siblings merge, the snapshot is exactly fresh; pnpm --dir frontend run build regenerates it from checked-out sources at any time.

Test plan

  • pnpm --dir frontend run build — builds both the main frontend and the embedded editor bundle
  • pnpm --dir frameos/editor run test — embed API tests pass
  • pnpm --dir frameos/wasm run typecheck — passes

🤖 Generated with Claude Code

Split out of #257. The embedded scene editor and in-browser scene
runtime:

- Embeddable AGPL scene editor bundle published as the frameos-editor
  npm package: full scene workspace panels, theme support via init
  message, light-mode diagram styling, hashed entry files, and a demo
  page; standalone embeds answer API calls with synthetic 404s
- frameos-wasm npm package (moved to frameos/wasm): typed wrapper
  around the emscripten wasm preview worker with a showIf-aware
  management interface; preview HTTP goes client-side first so the
  same-origin proxy only carries CORS-blocked hosts
- Live preview: renders keep unapplied form edits, one action row,
  "Save screenshot" in the Preview panel, event buttons send their
  label in the payload
- Release plumbing: publish-npm workflow job, per-package version
  sync in tools/update_versions.py (editor gets its own component
  hash in versions.json), pnpm workspace + Dockerfile entries
- Auth-guard redirects use replace instead of push so Back does not
  loop through the redirect

The regenerated frontend/src/generated/builtinApps.ts snapshot
includes app data from sibling PRs split out of #257 (bird journal
app, gallery error-image change); `pnpm --dir frontend run build`
regenerates it from the checked-out sources.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mariusandra
mariusandra merged commit eb53782 into main Jul 15, 2026
21 of 32 checks passed
@mariusandra
mariusandra deleted the embedded-editor-wasm branch July 15, 2026 07:19
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