Skip to content

Reload compiled TypeScript views from markup edits in native dev - #739

Merged
ctate merged 1 commit into
mainfrom
ctate/reload-compiled-typescript-9b634d
Oct 18, 2026
Merged

ctate merged 1 commit into
mainfrom
ctate/reload-compiled-typescript-9b634d

Conversation

@ctate

@ctate ctate commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator
  • native dev -Dtypescript-view=true now applies .native edits to the running app without a rebuild. The Debug build stages the development view evaluator and two exports (native_dev_view_prepare, native_dev_view_reset), and a watcher recompiles the markup with the same view compiler and hands each change to the app. A reload is an ordinary rebuild of every open window, so the model, widget identities, focus and retained widget state persist. A broken edit prints its location and keeps the last good view.
  • Updates are written atomically and carry the app session and a SHA-256 digest; the core refuses programs compiled for a different build (contract, evaluator, or the set of exported views). A stale, partial, damaged or foreign update is never applied. Adding a window or virtual window, or changing src/core.ts, still asks for a rebuild.
  • Nothing changes without the dev loop: release builds and Debug builds without -Dview-reload produce identical core archives, contracts and exports, and the reload code is not compiled in. A compiled-core battery covers reload with model and widget-id preservation, and the failure paths.

- `native dev -Dtypescript-view=true` now applies `.native` edits to the running app without a rebuild. The Debug build stages the development view evaluator and two exports (`native_dev_view_prepare`, `native_dev_view_reset`), and a watcher recompiles the markup with the same view compiler and hands each change to the app. A reload is an ordinary rebuild of every open window, so the model, widget identities, focus and retained widget state persist. A broken edit prints its location and keeps the last good view.
- Updates are written atomically and carry the app session and a SHA-256 digest; the core refuses programs compiled for a different build (contract, evaluator, or the set of exported views). A stale, partial, damaged or foreign update is never applied. Adding a window or virtual window, or changing `src/core.ts`, still asks for a rebuild.
- Nothing changes without the dev loop: release builds and Debug builds without `-Dview-reload` produce identical core archives, contracts and exports, and the reload code is not compiled in. A compiled-core battery covers reload with model and widget-id preservation, and the failure paths.
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
native-sdk Ready Ready Preview, v0 Oct 18, 2026 8:10pm UTC
native-sdk-schema Ready Ready Preview, v0 Oct 18, 2026 8:10pm UTC

@ctate
ctate merged commit 068815d into main Oct 18, 2026
36 checks passed

This branch was successfully deployed

2 active deployments
Preview – native-sdk — e4c1c2cc Deployed Oct 18, 2026 by vercel[bot]
Preview – native-sdk-schema — e4c1c2cc Deployed Oct 18, 2026 by vercel[bot]
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