feat: diagnostic/operate consume session capture + consoleMessages#817
Closed
jackwener wants to merge 2 commits intofeat/session-network-capturefrom
Closed
feat: diagnostic/operate consume session capture + consoleMessages#817jackwener wants to merge 2 commits intofeat/session-network-capturefrom
jackwener wants to merge 2 commits intofeat/session-network-capturefrom
Conversation
Wire diagnostic and operate to prefer session-level passive capture over legacy data sources, following the unified rule: read session capture first, fallback to previous API. Changes: - diagnostic collectPageState: readNetworkCapture → networkRequests fallback - operate open: startNetworkCapture before goto, JS interceptor only as fallback - operate network: readNetworkCapture → __opencli_net fallback - CDPPage.consoleMessages(): real implementation via Runtime.consoleAPICalled and Runtime.exceptionThrown CDP events (replaces BasePage empty-array stub) - 4 new tests for consoleMessages (capture, exception, filter, empty) - 1 new test for multi-request capture ordering Part of #810
Both operate network and explore parseNetworkRequests now handle both CDPPage fields (status, responseBody) and daemon/extension fields (responseStatus, responsePreview) when reading from readNetworkCapture. This ensures the daemon path doesn't regress with missing status/body.
f20e962 to
cd0d6d4
Compare
Owner
Author
|
Closing in favor of opus0's #816 (same fix, both approved) |
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
collectPageState()now prefersreadNetworkCapture()overnetworkRequests()(performance API), following the unified rule: session capture first, fallback to legacystartNetworkCapture()beforegoto(), fixing the initial-request timing gap. JS interceptor only injected as fallback when CDP capture unavailablewindow.__opencli_netRuntime.consoleAPICalled+Runtime.exceptionThrownevents, replacing BasePage's empty-array stub. Supports level filtering (error returns error+warning)Architecture
All consumers follow the same rule established in discussion with @codex-mini0:
No new ad-hoc data paths. diagnostic, operate, and explore (from PR A) all consume the same
IPagepassive capture contract.Test plan
OPENCLI_DIAGNOSTIC=1shows richer network data in diagnostic outputoperate networkshows initial page-load requestsDepends on #813. Ref #810