Skip to content

fix: include intercepted payloads in diagnostic#829

Merged
jackwener merged 3 commits intojackwener:mainfrom
Astro-Han:fix/diagnostic-network
Apr 6, 2026
Merged

fix: include intercepted payloads in diagnostic#829
jackwener merged 3 commits intojackwener:mainfrom
Astro-Han:fix/diagnostic-network

Conversation

@Astro-Han
Copy link
Copy Markdown
Contributor

Description

Improve diagnostic output by surfacing already-captured interceptor payloads in the existing page.networkRequests field.

This keeps the follow-up for #810 minimal:

  • collectPageState() now also reads page.getInterceptedRequests()
  • intercepted payloads are wrapped as source: 'interceptor' entries and prepended to the existing network list
  • diagnostic tests now cover inclusion, empty-interceptor fallback, and interceptor-read failures

Related issue: #810

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🌐 New site adapter
  • 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful

Documentation (if adding/modifying an adapter)

  • Added doc page under docs/adapters/ (if new adapter)
  • Updated docs/adapters/index.md table (if new adapter)
  • Updated sidebar in docs/.vitepress/config.mts (if new adapter)
  • Updated README.md / README.zh-CN.md when command discoverability changed
  • Used positional args for the command's primary subject unless a named flag is clearly better
  • Normalized expected adapter failures to CliError subclasses instead of raw Error

Screenshots / Output

$ npx tsc --noEmit
# exit 0

$ npm test
Test Files  44 passed (44)
     Tests  526 passed | 1 skipped (527)

@jackwener jackwener merged commit b8f0f58 into jackwener:main Apr 6, 2026
11 checks passed
@jackwener jackwener mentioned this pull request Apr 8, 2026
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