Skip to content

chore(cli): migrate dashboard to playwright protocol#40143

Open
Skn0tt wants to merge 1 commit intomicrosoft:mainfrom
Skn0tt:dashboard-pw-client
Open

chore(cli): migrate dashboard to playwright protocol#40143
Skn0tt wants to merge 1 commit intomicrosoft:mainfrom
Skn0tt:dashboard-pw-client

Conversation

@Skn0tt
Copy link
Copy Markdown
Member

@Skn0tt Skn0tt commented Apr 10, 2026

No description provided.

@Skn0tt Skn0tt requested a review from dgozman April 10, 2026 09:39
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [chrome] › mcp/autowait.spec.ts:19 › racy navigation destroys context @mcp-windows-latest

6467 passed, 383 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

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:280 › screencast › should capture navigation `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:652 › screencast › should capture full viewport `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:342 › screencast › should work for popups `@chromium-ubuntu-22.04-node22`
⚠️ [chromium-library] › library/video.spec.ts:724 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node22`
⚠️ [webkit-page] › page/page-set-input-files.spec.ts:38 › should upload a folder `@webkit-ubuntu-22.04-node20`

39154 passed, 846 skipped


Merge workflow run.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is this called cli.ts?

export type BrowserDescriptor = EndpointInfo & {
playwrightVersion: string;
playwrightLib: string;
playwrightClientLib: string;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Note that older versions won't have this, so you should be ready for that.

}

createWebSocket(transportFactory: (url: URL) => Transport, guid?: string) {
createWebSocket(transportFactory: (url: URL) => Transport | ServerTransport, guid?: string) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't quite like two types of transports. Let's make it a single one here.

@utils/**
../cli-client/registry.ts
../utils/**
../../remote/serverTransport.ts
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not sure whether this is bad with current bundles, please check with Pavel.

entryPoints: [
filePath('packages/playwright-client/src/cli.ts'),
],
outfile: filePath('packages/playwright-core/lib/clientBundle.js'),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't we need an entry in package.json to be able to require this?

onclose?: (cause?: string) => void;
}

// this entrypoint is used between dashboard and playwright-cli.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • I don't think this comment is too useful. Better explain this is the entry point to the client bundle.
  • Why not use playwright.chromium.connect()?
  • Should we also pass a platform instance?

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