Skip to content

fix(server): eliminate ~2-min test startup delay on Windows - #122

Merged
MyNameIsEdi merged 3 commits into
mainfrom
fix/pw-startup-speed-v2
May 25, 2026
Merged

MyNameIsEdi merged 3 commits into
mainfrom
fix/pw-startup-speed-v2

Conversation

@MyNameIsEdi

@MyNameIsEdi MyNameIsEdi commented May 25, 2026 •

Copy link
Copy Markdown
Owner

Description

Replaces npx playwright with a direct node @playwright/test/cli.js spawn in both /api/playwright/run and /api/run-dynamic-test. On Windows, npx + cmd.exe shell resolution was adding 30–90 s of overhead before any test ran. Also fires the Render warmup ping concurrently with Playwright startup (was sequential, blocking up to 55 s) and caps its timeout at 30 s.

Net result: test execution begins in ~1–2 s instead of ~2 minutes.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Summary by CodeRabbit

  • New Features

    • Pixel agents now react to chat interactions, displaying emotional reaction bubbles upon test completion.
    • Added "waiting" handoff indicators during multi-agent conversations.
    • New bubble sprite types for enhanced visual feedback.
  • Performance

    • Optimized Playwright startup speed.
    • Reduced server warmup timeout from 55 seconds to 30 seconds.

Review Change Stack

MyNameIsEdi and others added 2 commits May 25, 2026 12:04
Replace `npx playwright` with a direct `node @playwright/test/cli.js`
spawn in both the /api/playwright/run and /api/run-dynamic-test handlers.
npx + cmd.exe shell resolution was adding 30–90 s of overhead before any
test code ran on Windows. Also fire the Render warmup ping concurrently
with Playwright startup (was sequential) and cap its timeout at 30 s
(was 55 s), removing a second source of blocking delay.

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

coderabbitai Bot commented May 25, 2026 •

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR optimizes Playwright startup performance by replacing npx-based invocation with direct Node CLI execution and refactoring remote server warmup to run concurrently with test execution instead of blocking it, across both Playwright run and dynamic test endpoints, with updates to CHANGELOG, README, and wiki documentation.

Changes

Playwright Startup Optimization

Layer / File(s) Summary
Playwright CLI spawn and non-blocking remote warmup
server/index.ts
/api/playwright/run and /api/run-dynamic-test endpoints replace spawn('npx', ...) with process.execPath targeting @playwright/test/cli.js. Remote server warmup refactored from blocking await to concurrent async IIFE, with shorter timeout and warning/error messaging adjustments. Log messages updated to show direct playwright invocation rather than npx playwright.
Changelog, README, and wiki documentation updates
CHANGELOG.md, README.md, .github/wiki/Home.md
README architecture diagram updated to describe node @playwright/test/cli.js`` instead of npx playwright test. CHANGELOG gains new Performance subsection documenting faster Playwright startup and concurrent warmup with reduced warmup timeout. Quick links table in wiki Home.md reformatted for clarity; pixel agents changelog entry formatting adjusted.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • MyNameIsEdi/open-qa#109: Main PR's server/index.ts changes to /api/run-dynamic-test (switching Playwright spawning from npx to the local node_modules/@playwright/test/cli.js) directly overlap with the retrieved PR's introduction of the /api/run-dynamic-test SSE endpoint in the same file.

Poem

🐰 Hops with glee as Playwright springs alive,
No npx detours—CLI runs thrived!
Warmup spins freely while tests take flight,
Concurrent grace makes startup bright,
Faster clouds, swifter code, what delight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: eliminating Windows startup delay by replacing npx with direct Playwright CLI invocation.
Description check ✅ Passed The description covers all required sections with clear explanations of the fix, correctly marks it as a bug fix, and includes self-review confirmation, though it omits one optional checkbox item.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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/pw-startup-speed-v2

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

@MyNameIsEdi
MyNameIsEdi merged commit b705930 into main May 25, 2026
5 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