Skip to content

feat(mcp): pass MCP client name to extension connection#40049

Merged
yury-s merged 5 commits intomicrosoft:mainfrom
yury-s:feat-client-name
Apr 3, 2026
Merged

feat(mcp): pass MCP client name to extension connection#40049
yury-s merged 5 commits intomicrosoft:mainfrom
yury-s:feat-client-name

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented Apr 3, 2026

Summary

  • Add clientName to ClientInfo; MCP server populates it from the connecting client's name (via getClientVersion()), defaulting to 'Playwright MCP'
  • CLI daemon guesses the name from env vars (CLAUDECODE'Claude Code', COPILOT_CLI'GitHub Copilot'), defaulting to 'playwright-cli'
  • Pass the client name to the extension browser connection, replacing the hardcoded 'Playwright Agent'
  • Remove unused exports (createClientInfo, startCliDaemonServer, logUnhandledError, toMcpTool) from exports.ts

Comment thread packages/playwright-core/src/tools/cli-daemon/daemon.ts
@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Member

@pavelfeldman pavelfeldman left a comment

Choose a reason for hiding this comment

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

please fix what agreed offline

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@yury-s yury-s force-pushed the feat-client-name branch from 5cb0d45 to 8da9c7d Compare April 3, 2026 22:35
@yury-s yury-s force-pushed the feat-client-name branch from 846cfff to e793607 Compare April 3, 2026 23:03
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@yury-s yury-s merged commit c0cc980 into microsoft:main Apr 3, 2026
34 of 37 checks passed
@yury-s yury-s deleted the feat-client-name branch April 3, 2026 23:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

Test results for "tests 1"

1 failed
❌ [playwright-test] › ui-mode-test-network-tab.spec.ts:397 › should not preserve selection across test runs @macos-latest-node20

6 flaky ⚠️ [chromium-library] › library/popup.spec.ts:261 › should not throw when click closes popup `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:342 › screencast › should work for popups `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:724 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/popup.spec.ts:261 › should not throw when click closes popup `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1080 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-test-update.spec.ts:162 › should pick new / deleted nested tests `@windows-latest-node20`

39145 passed, 846 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

Test results for "MCP"

2 failed
❌ [chrome] › mcp/dashboard.spec.ts:23 › should show browser session chip @mcp-ubuntu-latest
❌ [msedge] › mcp/files.spec.ts:106 › clicking on download link emits download @mcp-windows-latest

6427 passed, 383 skipped


Merge workflow run.

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.

2 participants