fix(desktop): handle Squirrel startup events + CI smoke-install the Windows build#398
Merged
Merged
Conversation
…indows build
Two Windows-install fixes.
1. Add electron-squirrel-startup handling. main.ts had no handler for the
--squirrel-{install,updated,uninstall,obsolete} flags Squirrel runs the exe
with during install/update/uninstall. Without it the install hook booted the
full app (window + daemon spawn) and never exited, so the installer hung
waiting on it. Now we create/remove shortcuts and quit immediately; it is a
no-op on macOS/Linux.
2. Add a Windows CI smoke-install step. After the build, run Setup.exe --silent
on the clean native x64 windows-latest runner, assert the install dir is
created, and upload SquirrelSetup.log as an artifact. This captures the
install log we otherwise cannot get and gives a build-vs-host verdict: a clean
install proves the artifact is good, so a failing user machine is host-side
(AV/disk/signing). The runner has no real-time AV, so it does NOT prove
SmartScreen/Defender will accept the unsigned binaries on end-user machines;
code-signing stays the durable fix.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ng warning Update.exe writes SquirrelSetup.log into %LocalAppData%\AgentOrchestrator, not SquirrelTemp; the smoke step looked only in SquirrelTemp and so printed "failed before Update.exe ran" even on a successful install (exit 0, dir created). Look in the app root dir first, fall back to SquirrelTemp, and drop the false-failure wording. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Context
The Windows Squirrel installer fails on a tester's machine with "Installation has failed" and no
SquirrelSetup.logentry at all, meaningSetup.exedies beforeUpdate.exe(the part that logs) runs. The built artifacts are healthy (119MB Setup.exe wrapping a 118MB nupkg + RELEASES), so the build isn't truncated; the failure is host-side and/or in the install hooks. This PR addresses the app-side gap and gives us a way to actually capture the log.Changes
1. Handle Squirrel startup events (
main.ts). The app had noelectron-squirrel-startuphandler, onlyupdate-electron-app(auto-updates, unrelated). During install Squirrel runs the exe with--squirrel-install/--squirrel-updated/--squirrel-uninstall/--squirrel-obsoleteand waits for it to exit; without the handler the full app booted (window + daemon) and never exited, hanging the installer. Now it creates/removes shortcuts and quits immediately. No-op on macOS/Linux. (electron-squirrel-startupships no types, so a 6-line ambient.d.tsis added rather than pulling in@types.)2. CI smoke-install (
testing-build.yml). After the Windows build, runSetup.exe --silenton the clean native x64windows-latestrunner, assert%LocalAppData%\AgentOrchestratoris created, and uploadSquirrelSetup.logas a workflow artifact (continue-on-error, so it never blocks publishing).This is a build-vs-host verdict:
Caveat documented in the workflow: the runner has no real-time AV, so a clean install there does not prove SmartScreen/Defender will accept the unsigned binaries on end-user machines. Authenticode code-signing remains the durable fix and is the next follow-up.
Testing
npm run typecheck✅ (confirms the import + ambient declaration resolve)🤖 Generated with Claude Code