fix(windows): resolve process spawning and path resolution blockers for windows host#1612
fix(windows): resolve process spawning and path resolution blockers for windows host#1612micronox wants to merge 1 commit into
Conversation
…or windows host Replaced Unix-specific 'pnpm' reference with 'pnpm.cmd', injected shell: true to fix spawn EINVAL, and corrected UI copy syntax to resolve build crashes.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Visual recap — skippedThe visual recap job did not run for this pull request. This is informational only and does not block the PR. Recap skipped for |
There was a problem hiding this comment.
Builder reviewed your changes and found 3 potential issues 🔴
Review Details
This PR is a small but important infrastructure change aimed at restoring Windows-host compatibility for the lazy dev runner and the code-agents UI package build. The intent is sound: Windows does require different process-launch behavior, and the existing pnpm/spawn assumptions were blocking local development there. Risk assessment: standard because the diff touches shared dev/build tooling that affects local workflows across platforms.
The main concern is that the implementation hardcodes Windows-specific commands instead of selecting them conditionally. In scripts/dev-lazy.ts, replacing pnpm with pnpm.cmd fixes Windows spawning but regresses macOS/Linux, where pnpm.cmd does not exist. Similarly, the package build script now uses copy, which is a Windows shell builtin and fails in POSIX shells. I manually verified both regressions in this Linux review environment.
Key findings
- 🔴 HIGH: Windows-only
pnpm.cmdnow breaks non-Windows child process launches - 🔴 HIGH: Windows-only
copynow breaks non-Windows package builds
The PR is close, but it needs platform-aware command selection or a cross-platform copy mechanism before merge.
🧪 Browser testing: Skipped — PR only modifies backend/config/docs, no UI impact
| const child = spawn( | ||
| "pnpm.cmd", |
There was a problem hiding this comment.
🔴 Hardcoded pnpm.cmd breaks non-Windows app startup
This spawn now uses pnpm.cmd unconditionally, which fixes Windows but fails on macOS/Linux because that executable does not exist there. Pick pnpm.cmd only on Windows and keep pnpm for other platforms.
Additional Info
Found by 2/2 review agents. Manually verified on Linux: `spawnSync('pnpm.cmd', ['--version'])` returns ENOENT; `spawnSync('pnpm.cmd --version', { shell: true })` exits 127 with `/bin/sh: pnpm.cmd: not found`.
|
|
||
| startBackgroundProcess("core", "pnpm", [ | ||
| startBackgroundProcess("core", "pnpm.cmd", [ |
There was a problem hiding this comment.
🔴 Background worker launches are now Windows-only
The startBackgroundProcess call sites were also switched to pnpm.cmd, so the core/tray/frame/electron helpers will no longer start on macOS/Linux. Use the same platform-aware binary selection here as in the app spawn path.
Additional Info
Found by 2/2 review agents. `startBackgroundProcess()` itself still uses `shell: process.platform === 'win32'`, so these call sites now point Unix hosts at a nonexistent binary.
| }, | ||
| "scripts": { | ||
| "build": "tsgo && cp src/styles.css dist/styles.css", | ||
| "build": "tsgo && copy src\\styles.css dist\\styles.css", |
There was a problem hiding this comment.
🔴 Build script now uses a Windows-only copy command
copy is a cmd.exe builtin, so this build now fails on macOS/Linux shells. Please switch this step to a cross-platform copy mechanism instead of a Windows-specific command.
Additional Info
Found by 2/2 review agents. Manually verified on Linux with `npm run build --prefix packages/code-agents-ui`, which fails with `sh: 1: copy: not found`.
|
thanks for sending @micronox - some feedback here and CI failures to fix in order to merge |
|
Heya guys, sorry for the mix-up... my first time trying to submit a fix on github. Whats the best way to revoke everything... i can put it on my own fork and not mess up the lanes. |
Description
This PR resolves critical blockers preventing the
agent-nativedev server and UI from building and running on Windows host machines.Fixes included:
pnpmreferences withpnpm.cmdinscripts/dev-lazy.tsto allow Windows Node to properly spawn background workers.{ shell: true }to the child processspawnconfiguration inscripts/dev-lazy.ts. Without this, Windows throws anEINVALcrash when trying to execute the background Vite workers.Tested locally on Windows 11. All 12 templates successfully mount and proxy to the
127.0.0.1:8080gateway after these patches.