In packaged builds the server bundle and node-pty were sealed inside app.asar,
which the WSL backend's Linux Node cannot read, so the WSL backend never started
in release builds. It dead-ended on a misleading "node-pty not prepared / run
prepare:wsl" error. node-pty also publishes no Linux prebuilt, and the Windows
artifact is built on a Windows CI runner that cannot compile one.
- asarUnpack the server bundle and node-pty, and point the WSL backend at the
app.asar.unpacked sibling. The Windows primary still reads app.asar via
ELECTRON_RUN_AS_NODE, so it is unaffected and there is no payload duplication.
- Build the Linux pty.node in a dedicated Linux CI job and hand it to the
Windows packaging job as an artifact. build-desktop-artifact stages it into
node-pty/prebuilds/linux-<arch>/ with a marker, so the packaged app ships a
ready binary and needs no compiler, node-gyp, or network on first launch.
- node-pty is N-API, so one Linux binary works across all WSL Node versions;
drop the modules ABI comparison from the preflight probe accordingly.
- Runtime compile is now dev-only (allowBuild: !isPackaged). In packaged builds
a prebuilt that cannot load surfaces a clear arch/distro diagnostic instead of
nagging for build tools or silently compiling.