Skip to content

Fix Windows: welcome/loading screen quit-confirm hang + local dev-script portability - #69

Open
musgravebrenner wants to merge 4 commits into
brianwestphal:mainfrom
musgravebrenner:fix/windows-issue-68
Open

musgravebrenner wants to merge 4 commits into
brianwestphal:mainfrom
musgravebrenner:fix/windows-issue-68

Conversation

@musgravebrenner

Copy link
Copy Markdown

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.

  • Root cause of Hot Sheet not working on Windows #68: the shipped v0.20.0 Windows installer hard-codes tauri://localhost for the welcome screen, which WebView2 never resolves (it only serves http://tauri.localhost), so the webview stays on about:blank with no JS loaded. That URL-scheme bug is already fixed on main (6c6e5598, in the v0.21.0-beta.x releases) — it just hasn't reached a stable ("Latest") release yet.
  • A second, still-live bug this PR fixes: even with that fix, neither loading/welcome.html nor loading/index.html ever listened for the quit-confirm-requested event 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).
  • Two local Windows dev-setup bugs, found while verifying this environment: npm run dev/build:plugins/clean failed under cmd.exe (npm has no script-shell configured on Windows, so bash-only script syntax broke); and npm run tauri:dev / cargo check failed because the dev-mode sidecar stub script never appended .exe on Windows.

Test plan

  • npx tsc --noEmit — clean
  • npm run lint — 0 errors (pre-existing warnings only, unrelated files)
  • npm run dev:server — builds both plugins and boots successfully on Windows
  • cargo check --manifest-path src-tauri/Cargo.toml — succeeds on Windows
  • Manual: launch a Windows build, confirm the welcome/loading screen closes via the window's close button (added to docs/manual-test-plan.md)

🤖 Generated with Claude Code

brennermusgraveKPB and others added 4 commits September 16, 2026 09:01
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

No deployments
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.

Hot Sheet not working on Windows

2 participants