Skip to content

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 10 Aug 12:22
· 6 commits to main since this release

A hotfix for a serious bug in 0.4.0. If you are on 0.4.0, update. 0.4.0 has been marked pre-release and its Windows build should not be used.

🐛 Fixes

The editor served the WRONG project after every switch but the first. Open project A, then B: the editor reported B, the title said B, and the renderer loaded A's game code and A's assets — so edits were saved against A's tree. The only visible symptom was a console error blaming server.fs.allow, which was not the cause.

The chain: stopping the dev server resolved when the kill was issued rather than when the process exited, so the old Vite still held the port when its replacement spawned. The replacement died on --strictPort, the stale server kept answering, and a late exit event from the dead predecessor cleared the bookkeeping that described its live replacement — leaving an untracked server that outlived the editor and held the port into the next launch too.

It is now enforced by identity rather than timing, in three layers that each close a hole the others don't:

  • a superseded child can no longer clear state describing its replacement;
  • stopping the server waits for the process to actually exit, so the port is free before the respawn;
  • the server answering on the port must be the one we spawned — checked before spawning and again while waiting for it to come up.

A dev server this editor leaked onto the port (from a crash, or the state bug above) is now reclaimed at startup instead of quietly left running — it was still watching the repo and rewriting asset sidecars under a project nobody had open. A server belonging to another install or another live editor is refused and named, never taken.

The renderer's error message no longer asserts a cause it can't know: it asks the dev server who it is and names the other project.

Windows-only, both fixed: Stop Editor was a complete no-op that reported success, and the Open Recent submenu was unreachable from agent tooling (its labels are native paths, and they were being parsed as menu paths).

The same class of bug on the other side: on macOS, Open Recent was likewise unaddressable — a mac recent-project label is an absolute POSIX path, so it contained the very separator used to parse it, and the menu refused the exact path it had just advertised. And the force-kill path could still return before the process had released its port, which after the above change made the editor refuse to start on a port its own dying server still held.

📝 Other notable

  • 0.4.0's Windows regression was introduced by a #185 change in that release. macOS 0.4.0 and all of 0.3.8 are unaffected by the wrong-project bug, though the two macOS defects above are older.

Full Changelog: v0.4.0...v0.4.1