Repository navigation
Fix Windows: welcome/loading screen quit-confirm hang + local dev-script portability - #69
Open
musgravebrenner wants to merge 4 commits into
Open
musgravebrenner wants to merge 4 commits into
musgravebrenner wants to merge 4 commits into
Conversation
Investigated GitHub issue brianwestphal#68 ("Hot Sheet not working on Windows" — Open Folder unresponsive, window won't close, only Minimize works). Root cause of the reported symptoms was HS-9738 (already fixed on main/beta, not yet in a stable release): the shipped v0.20.0 Windows installer hard-coded tauri://localhost for the welcome-screen navigate, which WebView2 never resolves (it only serves http://tauri.localhost), so the webview stayed on about:blank with no JS ever loaded. Confirmed against this machine's own ~/.hotsheet/startup.log + shutdown.log from the failed run (12 unanswered CloseRequested events, no confirm_quit). Found a second, still-live bug along the way: the global CloseRequested handler in lib.rs always calls prevent_close() and waits for JS to invoke the confirm_quit command, but neither loading/welcome.html nor loading/index.html (the two pre-project screens) ever listened for the quit-confirm-requested event Rust emits — so even after the URL-scheme fix, a user sitting on either screen (most commonly: first launch, before opening any folder) could still never close the window from the UI, only via Task Manager. Both pages now listen for quit-confirm-requested and invoke confirm_quit immediately — no confirmation dialog needed, since neither screen can ever have a project or terminal running to protect. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
While verifying this machine's local Windows dev setup, npm run dev/dev:server
failed: npm has no script-shell configured, so on native Windows it runs
package.json scripts through cmd.exe by default regardless of which shell npm
itself was launched from. build:plugins used a bash `for d in plugins/*/; do
... done` loop with no explicit bash prefix, which cmd.exe can't parse at all
("d was unexpected at this time.").
Same class of bug HS-8714 already fixed for build:client — ported the same
way: scripts/build-plugins.mjs (Node fs + esbuild JS API) replaces the shell
loop. Also fixed clean and tauri:clean (rm -rf -> inline node -e + fs.rmSync)
and analyze:freeze (dropped the >/dev/null redirect, not a valid Windows
path). Verified npm run dev:server now builds both plugins correctly and
boots the server on Windows; tsc --noEmit and lint stay clean.
Not fixed here (filed as a follow-up, HS-2): test:fast / test:e2e:fast pass a
single-quoted --grep-invert pattern that cmd.exe doesn't group as one
argument the way a POSIX shell does. tauri:build:local's bash-only syntax is
left alone — it's a maintainer-only local release-signing helper.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…stub filename While verifying this machine could build/run the Tauri desktop shell (part of getting local Windows dependencies working end-to-end), `cargo check --manifest-path src-tauri/Cargo.toml` panicked: "resource path binaries\hotsheet-node-x86_64-pc-windows-msvc.exe doesn't exist". Same failure hits `npm run tauri:dev` / `tauri:dev:test` / `tauri:dev:watch` on any Windows checkout, since they all go through the same build.rs resource-existence check. Root cause: two separate scripts created the dev-mode sidecar placeholder. `scripts/ensure-sidecar-placeholder.mjs` (used by test:rust) correctly adds `.exe` on Windows. `scripts/ensure-sidecar-stub.sh` (used by tauri:dev*) built the stub path as `hotsheet-node-<triple>` unconditionally, with no extension — so on Windows it wrote a file Tauri's build script doesn't recognize, and the existence check still fails even after running it. Fix: point tauri:dev / tauri:dev:test / tauri:dev:watch at the already-correct ensure-sidecar-placeholder.mjs (it also covers the server/**/* resources glob check the bash script never handled) and delete the redundant, broken ensure-sidecar-stub.sh. Verified: cargo check now succeeds on this machine. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…S-3) The prior commit (sidecar stub filename fix) accidentally reused HS-3's number in its comments/message -- HS-3 was already the number for the separate npm-script-portability fix earlier in this session. Filed the proper ticket after the fact (HS-4) and correcting the two stray HS-3 references here to point at it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #68 ("Hot Sheet not working on Windows" — Open Folder unresponsive, window won't close, only Minimize works), plus two related Windows dev-setup bugs found while investigating.
tauri://localhostfor the welcome screen, which WebView2 never resolves (it only serveshttp://tauri.localhost), so the webview stays onabout:blankwith no JS loaded. That URL-scheme bug is already fixed onmain(6c6e5598, in thev0.21.0-beta.xreleases) — it just hasn't reached a stable ("Latest") release yet.loading/welcome.htmlnorloading/index.htmlever listened for thequit-confirm-requestedevent the Rust side emits on every close attempt, so a user on either pre-project screen could never close the window from the UI at all — only Task Manager. Both pages now acknowledge the event immediately (safe: neither screen can ever have a project/terminal running to protect).npm run dev/build:plugins/cleanfailed undercmd.exe(npm has noscript-shellconfigured on Windows, so bash-only script syntax broke); andnpm run tauri:dev/cargo checkfailed because the dev-mode sidecar stub script never appended.exeon Windows.Test plan
npx tsc --noEmit— cleannpm run lint— 0 errors (pre-existing warnings only, unrelated files)npm run dev:server— builds both plugins and boots successfully on Windowscargo check --manifest-path src-tauri/Cargo.toml— succeeds on Windowsdocs/manual-test-plan.md)🤖 Generated with Claude Code