feat(mcp): experimental --modal flag for browser_annotate (compare singleton vs per-request window)#40525
feat(mcp): experimental --modal flag for browser_annotate (compare singleton vs per-request window)#40525Skn0tt wants to merge 5 commits intomicrosoft:mainfrom
Conversation
Extract dashboard discovery behind a SessionProvider abstraction. RegistrySessionProvider keeps the existing serverRegistry-driven behavior; IdentitySessionProvider wraps a single user-provided BrowserContext. Expose openDashboardForContext(context) so callers can open the dashboard for a context they already have.
Extracts `show --annotate` into a dedicated `annotate` CLI command that forwards to the `browser_annotate` MCP tool. The daemon now propagates an AbortSignal per connection so that disconnecting an in-flight annotate cancels it on the daemon side as well.
# Conflicts: # packages/playwright-core/src/tools/dashboard/dashboardApp.ts # packages/playwright-core/src/tools/dashboard/dashboardController.ts
Adds a temporary modal: true input on browser_annotate (and matching --modal CLI option) that opens a dedicated dashboard window per request via Pavel's IdentitySessionProvider, instead of routing through the singleton dashboard daemon. Used to A/B-compare the two designs. The default (modal: false) path is unchanged.
Hands-on findingsPlayed with both modes by having two agents request annotations simultaneously. Modal DashboardLiked
Disliked
Singleton DashboardLiked
Disliked
PreferenceSingleton, with these changes:
|
Test results for "MCP"9 failed 6877 passed, 927 skipped Merge workflow run. |
Test results for "tests 1"7 flaky41578 passed, 784 skipped Merge workflow run. |
Spike branch to A/B-compare two browser_annotate designs:
modal: true/--modal) — uses Pavel'sIdentitySessionProviderfrom feat(dashboard): add openDashboardForContext entry point #40506 to open a dedicated dashboard window per request.Merges
pavel-dash(#40506) on top offeat-browser-annotate-cli(#40520) and adds the toggle without touching the default code path. Intentionally not for merge — the toggle exists so we can pick a winner and delete the other.Findings from a manual same-page concurrent test:
Screencast is already startedsince both attach a screencast to the same page.