Skip to content

Conversation

@kblok
Copy link
Member

@kblok kblok commented Oct 30, 2025

No description provided.

@kblok kblok requested a review from Copilot October 30, 2025 21:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements page error event handling for the BiDi protocol by adding log entry observation and propagating JavaScript errors through the event system.

Key changes:

  • Added log entry event infrastructure through Session and BrowsingContext
  • Implemented JavaScript error detection and stack trace formatting in BidiFrame
  • Updated test expectations to enable PageError tests for BiDi

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/PuppeteerSharp/Bidi/Core/Session.cs Added LogEntryAdded event and observer registration
lib/PuppeteerSharp/Bidi/Core/BrowsingContext.cs Added Log event and filtering logic for context-specific entries
lib/PuppeteerSharp/Bidi/BidiPage.cs Exposed OnPageError method for internal use
lib/PuppeteerSharp/Bidi/BidiFrame.cs Implemented JavaScript error handling with stack trace formatting
lib/PuppeteerSharp.Tests/PageTests/PageEventsPageErrorTests.cs Refactored test to use TaskCompletionSource and filter for specific error
lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json Removed BiDi failure expectation for PageError tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kblok kblok merged commit f05e8e3 into v21 Oct 31, 2025
17 of 19 checks passed
@kblok kblok deleted the bidi-page-error branch October 31, 2025 11:48
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.

2 participants