Repository navigation
fix(desktop): bootstrap Electron before dev startup - #1146
Merged
Merged
Conversation
Electron 43 installs its platform binary when the package is resolved, but electron-vite reads the installation marker before doing so. This made first-time development launches fail outside macOS. Resolve Electron before the platform-specific launcher setup and retain the startup ordering with a regression test. Closes vastsa#1144
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.
Fixes #1144.
Electron 43 downloads its platform binary when the
electronpackage isresolved.
electron-viteexpects the resultingpath.txtmarker, while thedevelopment launcher previously resolved Electron only on macOS. A first
pnpm devon Linux or Windows therefore stopped after the Vite builds withError: Electron uninstall.Resolve Electron before platform-specific launcher setup. macOS continues to
use that resolved executable when it creates its branded development host. A
source-contract regression test locks the ordering.
Validation:
node --test apps/desktop/test/development-branding.test.mjs(9 passed; 1 macOS-only test skipped)pnpm --filter @pi-desktop/desktop buildpnpm check:pr-basepnpm devwith an isolatedPI_DESKTOP_DATA_DIR: Electron, host-core,agent sidecar, and bundled plugins started successfully. The command was
intentionally terminated after 35 seconds.
pnpm test:e2e:bootwas run twice after the final commit and failed itsexisting 800-session list latency threshold. Both runs completed the Electron
boot, preload/IPC, host-core and project-remove checks; only later list reads
exceeded 1s (about 1.2-2.0s). This suite launches the built application,
not
scripts/dev-electron.mjs, and the failure is unrelated to the changeddevelopment-launch ordering.