Skip to content

Fix Playwright MCP config path quoting - #187

Merged
Priyanshu Agrawal (priyanshu92) merged 2 commits into
mainfrom
priyanshu92/fix-issue-186
Jun 10, 2026
Merged

Fix Playwright MCP config path quoting#187
Priyanshu Agrawal (priyanshu92) merged 2 commits into
mainfrom
priyanshu92/fix-issue-186

Conversation

@priyanshu92

Copy link
Copy Markdown
Collaborator

The Power Pages Playwright MCP launcher passes its config path through shell: true, so plugin install paths containing spaces can be split by the shell before reaching @playwright/mcp. This change quotes the generated config path before it is passed to npx, preserving it as one argument.

Changes

  • Adds shell argument quoting for the fullscreen config path, including Windows cmd.exe handling.
  • Lets the launcher test inject a config path/platform and adds regression coverage for Windows paths with spaces.

Validation

  • node --test plugins/power-pages/scripts/tests/launch-playwright-mcp.test.js
  • node --test plugins/power-pages/scripts/tests/

Fixes #186

Quote the Power Pages Playwright MCP config path before passing it through the shell so plugin install paths with spaces are preserved as a single argument. Add regression coverage for Windows-style paths with spaces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 10, 2026 16:30
@priyanshu92
Priyanshu Agrawal (priyanshu92) requested a review from a team as a code owner June 10, 2026 16:30

Copilot AI left a comment

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.

Pull request overview

This PR fixes Power Pages’ Playwright MCP launcher failing when the plugin install path contains spaces by shell-quoting the generated --config path before invoking npx with shell: true, and adds regression tests for Windows paths with spaces.

Changes:

  • Introduces quoteShellArg() and applies it to the --config argument in the Power Pages Playwright MCP launcher.
  • Extends buildMcpArgs() to allow injecting configPath/platform for testing.
  • Adds a Windows regression test covering config paths with spaces.
Show a summary per file
File Description
plugins/power-pages/scripts/launch-playwright-mcp.js Adds shell-argument quoting for the config path (with Windows handling) and exports the helper for testing.
plugins/power-pages/scripts/tests/launch-playwright-mcp.test.js Updates/extends tests to validate quoting behavior, including a Windows path-with-spaces regression case.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment thread plugins/power-pages/scripts/tests/launch-playwright-mcp.test.js
Address review comment on launch Playwright MCP config path assertions by comparing the generated --config argument to a directly computed expected path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@priyanshu92
Priyanshu Agrawal (priyanshu92) merged commit 36fcbc7 into main Jun 10, 2026
6 checks passed
@priyanshu92
Priyanshu Agrawal (priyanshu92) deleted the priyanshu92/fix-issue-186 branch June 10, 2026 16:46
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.

[power-pages][Bug] playwright MCP server fails to launch when plugin path contains a space (MCP error -32000: Connection closed)

3 participants