Skip to content

fix(server): revert playwright spawn to npx — node cli.js exits immediately on Windows#124

Merged
MyNameIsEdi merged 1 commit into
mainfrom
fix/revert-node-cli-spawn
May 25, 2026
Merged

fix(server): revert playwright spawn to npx — node cli.js exits immediately on Windows#124
MyNameIsEdi merged 1 commit into
mainfrom
fix/revert-node-cli-spawn

Conversation

@MyNameIsEdi
Copy link
Copy Markdown
Owner

@MyNameIsEdi MyNameIsEdi commented May 25, 2026

PR #122 replaced npx playwright with node @playwright/test/cli.js (shell: false). On Windows, spawning without cmd.exe means playwright exits immediately with no output — tests appear "done" the instant Run Tests is clicked.

Reverts the spawn back to npx playwright with shell: process.platform === 'win32'. The non-blocking remote warmup (the real startup speedup from #122) is preserved.

Summary by CodeRabbit

  • Refactor
    • Updated Playwright process invocation in API endpoints with improved cross-platform shell configuration and enhanced compatibility across operating systems.

Review Change Stack

…iately on Windows

Direct node spawn with shell:false does not replicate the Windows console
handle inheritance that cmd.exe provides; playwright exits with no output.
Reverts to npx playwright with shell:true on win32. The non-blocking remote
warmup (the real startup speedup) is preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 73cb3c1d-9a23-4b63-bd1a-90227dee05a1

📥 Commits

Reviewing files that changed from the base of the PR and between b705930 and 3e6650e.

📒 Files selected for processing (1)
  • server/index.ts

📝 Walkthrough

Walkthrough

The server updates two Playwright SSE streaming endpoints to spawn Playwright processes via npx playwright instead of directly invoking the local CLI. Both endpoints conditionally enable the shell option for Windows. A minor whitespace adjustment is also made to the artifacts endpoint.

Changes

Playwright Process Spawning

Layer / File(s) Summary
Playwright spawning refactor and shell handling
server/index.ts
/api/playwright/run and /api/run-dynamic-test now spawn Playwright using npx playwright with platform-specific shell handling: shell enabled on Windows, disabled elsewhere. A minor structural adjustment is made to the artifacts endpoint.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through spawning streams,
Where npx flows like cleaner dreams,
Windows shells are now the case,
Direct CLI takes its place—
Swift migration, clean and bright!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/revert-node-cli-spawn

Comment @coderabbitai help to get the list of available commands and usage tips.

@MyNameIsEdi MyNameIsEdi merged commit 8288494 into main May 25, 2026
3 of 6 checks passed
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