Skip to content

feat: report pages opened by input actions - #2679

Open
lisa0314 wants to merge 1 commit into
ChromeDevTools:mainfrom
lisa0314:fix/367-report-new-pages
Open

feat: report pages opened by input actions#2679
lisa0314 wants to merge 1 commit into
ChromeDevTools:mainfrom
lisa0314:fix/367-report-new-pages

Conversation

@lisa0314

@lisa0314 lisa0314 commented Sep 7, 2026

Copy link
Copy Markdown

Fixes #367

When an input action opens one or more pages, capture the source page's Puppeteer popup events and report only those newly opened pages in the action response.

Each new page is listed under ## New pages with its MCP page ID, title, and URL. The same entries are exposed through structuredContent.newPages. Pages that were already open are not included, and the complete page list is not enabled implicitly.

Tests cover a single popup with an unrelated pre-existing page, multiple popups in event order with distinct MCP page IDs, and popup listener cleanup.

Testing

  • npm run build
  • npm run check-format
  • npm run test -- tests/utils/WaitForHelper.test.ts tests/tools/input.test.ts
  • npm run test -- tests/tools/extensions.test.ts tests/tools/pages.test.ts

@lisa0314

lisa0314 commented Sep 8, 2026

Copy link
Copy Markdown
Author

PTAL. Thanks!

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.

return all pages when click web element

1 participant