Skip to content

Install bb-app from npm on native Windows - #4736

Merged
SawyerHood merged 1 commit into
mainfrom
bb/windows-npm-install-thr_jensq3v9th
Oct 2, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/windows-npm-install-thr_jensq3v9th

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

npm refused bb-app on Windows with EBADPLATFORM because the package's os list named only macOS and Linux, and the README and platform docs said native Windows was not supported. The tarball smoke that guards the npm path could not run on Windows: it spawned npm, npx, and the installed bin links by bare name, and stopped only the direct child. Part of #1206. Stacked on #4735, whose behavior the platform doc describes.

What changed

  • packages/bb-app/package.json: os includes win32.
  • packages/bb-app/scripts/smoke-tarball.mjs and managed-process.mjs: on Windows the smoke runs npm and npx through Node, runs each installed command through the .cmd shim npm creates, stops process trees with taskkill (bounded to 2 seconds, then the direct kill), and retries removing its temp directory. macOS and Linux behavior is unchanged.
  • .github/workflows/ci.yml: the Windows app smoke job also runs smoke:tarball.
  • Docs: the README, packages/bb-app/README.md, docs/platform-support.md, and docs/windows-ci.md describe native Windows as an alpha host beside WSL2 (Git for Windows required, drive-letter paths, PowerShell terminals, the Windows machine command, no server move to Windows).

How you verified

  • Windows 11 Enterprise VM (build 26300): node scripts/smoke-tarball.mjs passed in about a minute: npm pack, npx --package <tarball> bb-app --help, npm install of the tarball, the help and config commands through the .cmd shims, the provider bridge and plugin host worker bundles, the full stack, and a joined daemon. Before the os change npm refused the tarball.
  • Linux: smoke:tarball passes; the bb-app package tests pass with the updated os assertion. On this branch before the last rebase, turbo run lint typecheck test --filter='...[origin/main]': 184 of 186 tasks passed. The failing tasks were the app and server test tasks, with tests that time out when the development machine is loaded (PromptBoxInternal.test.tsx, machine-environment.test.ts, plugin-native-server-loading.test.ts) and pass when run alone. After the rebase onto current main, lint and typecheck pass for the same filter.

Not verified: npx bb-app@latest from the public registry (nothing is published with this change yet); the new CI step has not run.

🤖 Generated with Claude Code

AGENT GENERATED

@SawyerHood
SawyerHood added this pull request to stack #4740 October 2, 2026 15:55
@SawyerHood
SawyerHood marked this pull request as ready for review October 2, 2026 16:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T16:53:15.413989Z 510feeb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 510feebc87

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +22 to +26
execFile(
"taskkill",
["/pid", String(pid), "/T", "/F"],
{ windowsHide: true },
() => resolvePromise(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bound the taskkill subprocess with a timeout

When taskkill itself stalls, this promise never resolves, so the Windows branch awaiting it never reaches the fallback SIGKILL and ignores PROCESS_STOP_TIMEOUT_MS; the new Windows tarball smoke can therefore hang until the workflow's 40-minute job timeout. This failure mode is already handled with a two-second deadline in packages/process-utils/src/windows-process-tree.ts, so this cleanup should use the shared helper or apply an equivalent deadline.

Useful? React with 👍 / 👎.

@SawyerHood
SawyerHood force-pushed the bb/windows-npm-install-thr_jensq3v9th branch from 510feeb to 2a272e6 Compare October 2, 2026 17:29
Base automatically changed from bb/windows-remote-machines-thr_jensq3v9th to main October 2, 2026 18:09
npm refused bb-app on Windows because its os list named only macOS and
Linux, and the docs called native Windows unsupported. The package now
lists win32, and the README and platform docs describe native Windows as
an alpha host beside WSL2. The tarball smoke runs on Windows: it starts
npm and npx through Node, runs the installed commands through npm's .cmd
shims, stops process trees with taskkill, and retries removing its temp
directory. The Windows app smoke CI job runs it.

Co-Authored-By: Claude Code <[email protected]>
@SawyerHood
SawyerHood force-pushed the bb/windows-npm-install-thr_jensq3v9th branch from 2a272e6 to a9a8fd4 Compare October 2, 2026 18:09
@SawyerHood
SawyerHood merged commit a1ecf0a into main Oct 2, 2026
27 checks passed
@SawyerHood
SawyerHood deleted the bb/windows-npm-install-thr_jensq3v9th branch October 2, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant