fix(dev): stabilize Utoopack HMR and file watching - #80
Conversation
Let Utoopack observe generated .ev changes directly and reuse published facts for topology-preserving artifact relinks. Harden framework watcher fallback, polling backoff, and symlink replacement recovery.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe PR changes Utoopack development publication to reuse published build facts during artifact-only transitions. It also adds macOS Seatbelt polling selection, bounded polling retries, native watcher recovery, and symlink topology-race handling. ChangesUtoopack publication lifecycle
Development watcher recovery
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e4da9ece8d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const { facts, serverStatsVersion } = | ||
| await this.collectFinalBuildFacts(plan); | ||
| ): () => Promise<void> { | ||
| const facts = this.publishedFacts; |
There was a problem hiding this comment.
Relink generated updates from fresh client facts
When a generated client module changes its imports—for example, an existing plugin module starts importing a stylesheet—the BuildPlan can remain artifact-only while Utoopack's entrypoint asset inventory gains main.css. This path always republishes the cached facts from before the generated-input rebuild, so the regenerated HTML and manifest omit that asset; client-only sessions have no stats monitor to correct them, and mixed sessions can also read server stats before the client rebuild finishes. Wait for fresh client stats or monitor and relink after the client compile instead of treating topology preservation as asset preservation.
AGENTS.md reference: AGENTS.md:L42-L43
Useful? React with 👍 / 👎.
Summary
.evinputs while EVJS relinks topology-preserving framework artifacts from the last published build facts.Changes
.evtimestamp touching and stats-version polling as an EVJS update barrier.readlinkobservesEINVAL.Validation
npm run check-typesnpm run lintnpm test— 17/17 tasks passed;@evjs/ev813/813 tests;@evjs/bundler-utoopack87/87 testsnpx vitest run tests/commands.test.ts— 241/241 testsgit diff --checkRisk / rollout
stats.jsonremains a source of normal server build facts, but it is no longer used as an EVJS plan-transition completion barrier.Reviewer notes
packages/bundler-utoopack/src/adapter/index.ts.Summary by CodeRabbit
New Features
Bug Fixes