Skip to content

chore(protocol): replace EventTarget interface with Metadata.wait#40699

Open
dgozman wants to merge 1 commit intomicrosoft:mainfrom
dgozman:chore-remove-event-target
Open

chore(protocol): replace EventTarget interface with Metadata.wait#40699
dgozman wants to merge 1 commit intomicrosoft:mainfrom
dgozman:chore-remove-event-target

Conversation

@dgozman
Copy link
Copy Markdown
Collaborator

@dgozman dgozman commented May 7, 2026

Summary

  • Drop the EventTarget protocol interface; its only command, waitForEventInfo, was already special-cased by the dispatcher.
  • Carry wait info on Metadata.wait instead, and route waits through a fire-and-forget Connection.sendWaitMessage / dispatcher _handleWait path.
  • Pre-render the action title server-side so tracing works without a metainfo entry.

EventTarget existed only to declare waitForEventInfo for the channels that
extended it. The dispatcher already special-cased that method, so move the
wait info into Metadata, drop the EventTarget interface, and route waits
through a dedicated fire-and-forget Connection.sendWaitMessage / dispatcher
_handleWait path.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Test results for "MCP"

12 failed
❌ [chrome] › mcp/annotate.spec.ts:57 › should capture multiple screenshots in one annotation @mcp-windows-latest-chrome
❌ [chrome] › mcp/annotate.spec.ts:110 › should abort annotation when last screenshot is removed @mcp-windows-latest-chrome
❌ [chromium] › mcp/annotate.spec.ts:398 › should cancel browser_annotate when the MCP client disconnects @mcp-windows-latest-chromium
❌ [chromium] › mcp/annotate.spec.ts:427 › should switch screencast to -s session on show --annotate @mcp-windows-latest-chromium
❌ [chromium] › mcp/test-run.spec.ts:126 › test_run should stop when aborted @mcp-windows-latest-chromium
❌ [firefox] › mcp/annotate.spec.ts:173 › user-initiated annotate downloads zip with feedback.md @mcp-macos-latest-firefox
❌ [msedge] › mcp/test-run.spec.ts:126 › test_run should stop when aborted @mcp-windows-latest-msedge
❌ [webkit] › mcp/config.ini.spec.ts:57 › ini config sets browser launch options @mcp-windows-latest-webkit
❌ [webkit] › mcp/config.ini.spec.ts:89 › ini config sets server and network options @mcp-windows-latest-webkit
❌ [webkit] › mcp/config.spec.ts:138 › browser_get_config returns merged config from file, env and cli @mcp-windows-latest-webkit
❌ [webkit] › mcp/http.spec.ts:103 › http transport browser lifecycle (isolated) @mcp-windows-latest-webkit
❌ [webkit] › mcp/http.spec.ts:142 › http transport browser sigint @mcp-windows-latest-webkit

6471 passed, 969 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Test results for "tests 1"

23 failed
❌ [chromium-library] › library/tracing.spec.ts:784 › should not emit after w/o before @ubuntu-22.04-chromium-tip-of-tree
❌ [chromium-library] › library/tracing.spec.ts:784 › should not emit after w/o before @chromium-ubuntu-22.04-arm-node20
❌ [chromium-library] › library/tracing.spec.ts:784 › should not emit after w/o before @chromium-ubuntu-22.04-node24
❌ [chromium-library] › library/tracing.spec.ts:784 › should not emit after w/o before @chromium-ubuntu-22.04-node20
❌ [chromium-library] › library/tracing.spec.ts:784 › should not emit after w/o before @chromium-ubuntu-22.04-node22
❌ [firefox-library] › library/tracing.spec.ts:784 › should not emit after w/o before @firefox-ubuntu-22.04-node20
❌ [webkit-library] › library/tracing.spec.ts:784 › should not emit after w/o before @webkit-ubuntu-22.04-node20
❌ [playwright-test] › test-step.spec.ts:1175 › should report api steps @ubuntu-latest-node20
❌ [playwright-test] › test-step.spec.ts:1427 › calls from waitForEvent callback should be under its parent step @ubuntu-latest-node20
❌ [playwright-test] › test-step.spec.ts:1482 › reading network request / response should not be listed as step @ubuntu-latest-node20
❌ [playwright-test] › test-step.spec.ts:1175 › should report api steps @macos-latest-node20
❌ [playwright-test] › test-step.spec.ts:1427 › calls from waitForEvent callback should be under its parent step @macos-latest-node20
❌ [playwright-test] › test-step.spec.ts:1482 › reading network request / response should not be listed as step @macos-latest-node20
❌ [playwright-test] › test-step.spec.ts:1175 › should report api steps @ubuntu-latest-node24
❌ [playwright-test] › test-step.spec.ts:1427 › calls from waitForEvent callback should be under its parent step @ubuntu-latest-node24
❌ [playwright-test] › test-step.spec.ts:1482 › reading network request / response should not be listed as step @ubuntu-latest-node24
❌ [playwright-test] › test-step.spec.ts:1175 › should report api steps @ubuntu-latest-node22
❌ [playwright-test] › test-step.spec.ts:1427 › calls from waitForEvent callback should be under its parent step @ubuntu-latest-node22
❌ [playwright-test] › test-step.spec.ts:1482 › reading network request / response should not be listed as step @ubuntu-latest-node22
❌ [playwright-test] › test-step.spec.ts:1175 › should report api steps @windows-latest-node20
❌ [playwright-test] › test-step.spec.ts:1427 › calls from waitForEvent callback should be under its parent step @windows-latest-node20
❌ [playwright-test] › test-step.spec.ts:1482 › reading network request / response should not be listed as step @windows-latest-node20
❌ [playwright-test] › ui-mode-test-network-tab.spec.ts:395 › should copy network request @windows-latest-node20

2 flaky ⚠️ [chromium-library] › library/video.spec.ts:682 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-arm-node20`
⚠️ [firefox-page] › page/page-request-gc.spec.ts:19 › should work `@firefox-ubuntu-22.04-node20`

41630 passed, 851 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.

1 participant