Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

fix(server): restart SSR isolate on source file changes#73

Merged
viniciusdacal merged 1 commit into
mainfrom
viniciusdacal/fix/ssr-hot-reload
Apr 1, 2026
Merged

fix(server): restart SSR isolate on source file changes#73
viniciusdacal merged 1 commit into
mainfrom
viniciusdacal/fix/ssr-hot-reload

Conversation

@viniciusdacal
Copy link
Copy Markdown
Contributor

Summary

  • The persistent V8 isolate cached app.tsx and its component tree at startup but never reloaded on file changes — client HMR worked, but page refresh showed stale SSR content
  • Moved the isolate restart from server.ts-only to once-per-debounced-batch, so any source file change triggers a zero-downtime create-then-swap isolate restart
  • This also fixes the existing gap where server.ts dependencies didn't trigger an API isolate restart

Test plan

  • Run vtz dev in an SSR app, edit a component, verify browser HMR still works instantly
  • After editing, hard-refresh the page — SSR output should reflect the latest code
  • Verify [Server] Isolate restarted (source change) appears in dev server logs on file save
  • Quality gates pass: cargo test --all && cargo clippy --all-targets --release -- -D warnings && cargo fmt --all -- --check

🤖 Generated with Claude Code

…hot reload

The persistent V8 isolate cached app.tsx at startup and never reloaded
it when source files changed. Client HMR worked but refreshing the page
showed stale SSR content. Move the isolate restart from server.ts-only
to once-per-debounced-batch so any source change (components, app.tsx,
server.ts) triggers a zero-downtime create-then-swap restart.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@viniciusdacal viniciusdacal merged commit c348b8f into main Apr 1, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant