Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/code-agents-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"provenance": true
},
"scripts": {
"build": "tsgo && cp src/styles.css dist/styles.css",
"build": "tsgo && copy src\\styles.css dist\\styles.css",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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`.

Fix in Builder

"prepublishOnly": "npm run build",
"typecheck": "tsgo --noEmit"
},
Expand Down
13 changes: 7 additions & 6 deletions scripts/dev-lazy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@ function startApp(app: TemplateApp): void {
app.outputTail = undefined;

const basePath = `/${app.id}`;
const child = spawn(
"pnpm",
const child = spawn(
"pnpm.cmd",
Comment on lines +858 to +859

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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`.

Fix in Builder

[
"--dir",
app.dir,
Expand All @@ -869,6 +869,7 @@ function startApp(app: TemplateApp): void {
"--strictPort",
],
{
shell: true,
cwd: ROOT,
stdio: ["ignore", "pipe", "pipe"],
detached: process.platform !== "win32",
Expand Down Expand Up @@ -1406,7 +1407,7 @@ if (usePollingFileWatcher) {
);
}

startBackgroundProcess("core", "pnpm", [
startBackgroundProcess("core", "pnpm.cmd", [
Comment on lines 1409 to +1410

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Fix in Builder

"--filter",
"@agent-native/core",
"exec",
Expand Down Expand Up @@ -1464,7 +1465,7 @@ function listen(port: number, attempts = 20): void {
// Google sign-in opens the Clips backend URL directly in the browser.
const startClipsTray = () => {
if (shuttingDown) return;
startBackgroundProcess("tray", "pnpm", [
startBackgroundProcess("tray", "pnpm.cmd", [
"--filter",
"clips-desktop",
"dev",
Expand Down Expand Up @@ -1497,13 +1498,13 @@ function listen(port: number, attempts = 20): void {
const env = electronLazyEnv();
startBackgroundProcess(
"frame",
"pnpm",
"pnpm.cmd",
["--filter", "@agent-native/frame", "dev"],
env,
);
startBackgroundProcess(
"electron",
"pnpm",
"pnpm.cmd",
["--filter", "@agent-native/desktop-app", "dev"],
env,
);
Expand Down
Loading