Allow page-free Playwright execution to skip active-tab resolution - #352
Closed
ehfeng wants to merge 1 commit into
Closed
Allow page-free Playwright execution to skip active-tab resolution#352ehfeng wants to merge 1 commit into
ehfeng wants to merge 1 commit into
Conversation
ehfeng
force-pushed
the
codex/cus-580-skip-page-resolution
branch
3 times, most recently
from
August 24, 2026 22:03
2bb3e64 to
568088b
Compare
ehfeng
force-pushed
the
codex/cus-580-skip-page-resolution
branch
from
August 24, 2026 22:05
568088b to
6a4703a
Compare
Contributor
|
closing this: we decided against adding |
This was referenced Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stack
This PR is based on #347 and contains only the page-free execution optimization. The strengthened cross-context regression assertion was committed directly to #347.
Higher-level callers such as browser-runtime.listPages must send resolve_active_page: false to use this path.
Validation
The Docker-backed e2e was not run locally because Docker is unavailable.
Note
Medium Risk
Changes how injected
page/contextare chosen when callers opt out of active-tab resolution; default behavior stays the same, but wrong use offalsecould run code against an unintended tab.Overview
Adds an optional
resolve_active_pageflag on Execute Playwright Code (defaults to true when omitted). The API forwards it through the Unix-socket daemon protocol so callers can skip Chrome foreground-tab CDP resolution when their script only usesbrowser(e.g. listing pages across contexts).When
resolve_active_pageis false, the daemon no longer callsresolveActivePagebefore execution; it still injectspageandcontextvia the existing newest-open-page fallback. OpenAPI and generatedoapitypes document the field.E2E coverage asserts that a
browser-only request withresolve_active_page: falsereturns the expected page count without breaking the subsequent active-tab resolution test.Reviewed by Cursor Bugbot for commit 6a4703a. Bugbot is set up for automated code reviews on this repo. Configure here.