Skip to content

fix: preserve console history across same-document navigations - #2655

Closed
lisa0314 wants to merge 1 commit into
ChromeDevTools:mainfrom
lisa0314:fix/preserve-console-history-spa
Closed

lisa0314 wants to merge 1 commit into
ChromeDevTools:mainfrom
lisa0314:fix/preserve-console-history-spa

Conversation

@lisa0314

@lisa0314 lisa0314 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #2650.

Summary

  • distinguish Puppeteer's same-document frame event before rotating collector storage
  • keep History API and hash navigations in the current bucket while preserving cross-document navigation history
  • add focused collector coverage and a real-browser list_console_messages regression

Testing

  • npm run check-format
  • npm run test tests/collectors/PageCollector.test.ts
  • npm run test tests/tools/console.test.ts
  • git diff --check

The complete npm run test suite was also run locally. It reached the end with two unrelated failures that reproduce on an unmodified origin/main checkout: the network snapshot test is retried and requests a missing second snapshot, and Chrome rejects the large full-page screenshot with Page.captureScreenshot: Page is too large.

@google-cla

google-cla Bot commented Sep 4, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@lisa0314

lisa0314 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

PTAL. Thanks!

@lisa0314
lisa0314 force-pushed the fix/preserve-console-history-spa branch from bdf4a76 to 78db041 Compare September 8, 2026 02:33
@lisa0314
lisa0314 force-pushed the fix/preserve-console-history-spa branch from 78db041 to f989cf9 Compare September 8, 2026 02:39
pull Bot pushed a commit to Pet3cy/chrome-devtools-mcp that referenced this pull request Sep 10, 2026
…eDevTools#2676)

Fixes ChromeDevTools#2650

Alternative to ChromeDevTools#2655: that PR is currently failing all CI checks and its
diff reverts the `background` support added in ChromeDevTools#2658. This
implementation is based on the latest `main` and keeps that feature
intact.
@Lightning00Blade

Copy link
Copy Markdown
Collaborator

This was fixed by #2676
It seems like this slipped though.

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.

list_console_messages history is wiped by same-document (SPA) navigations

2 participants