Skip to content

fix(browser): clarify empty network captures#1607

Open
jun0315 wants to merge 1 commit into
jackwener:mainfrom
jun0315:feat/browser-network-empty-hints
Open

fix(browser): clarify empty network captures#1607
jun0315 wants to merge 1 commit into
jackwener:mainfrom
jun0315:feat/browser-network-empty-hints

Conversation

@jun0315
Copy link
Copy Markdown
Contributor

@jun0315 jun0315 commented May 16, 2026

Description

Improves browser network behavior when a capture produces no visible entries.

This PR adds structured empty_reason and empty_hint fields so users and agents can distinguish between:

  • no requests captured yet
  • JS fallback capture being installed after requests already fired
  • default filtering hiding all captured requests
  • --filter, --failed, --since, or --until removing all entries

It also hardens the fresh capture path: if native network capture startup fails, browser network now attempts the JS interceptor fallback instead of failing before
fallback is tried.

Related issue: Partially addresses #1473

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 vitest run --project unit src/cli.test.ts
# 163 passed

npm run typecheck
# passed

git diff --check
# passed

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.

1 participant