豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

fix: apply pagination to network request output#970

Closed
AI-Reviewer-QS wants to merge 1 commit intoChromeDevTools:mainfrom
AI-Reviewer-QS:fix/network-request-pagination
Closed

fix: apply pagination to network request output#970
AI-Reviewer-QS wants to merge 1 commit intoChromeDevTools:mainfrom
AI-Reviewer-QS:fix/network-request-pagination

Conversation

@AI-Reviewer-QS
Copy link
Copy Markdown

Summary

  • Network request pagination was cosmetic-only: the header showed "Showing 1-10 of 30" but all requests were rendered in both text and structured content
  • The format() method computed pagination on raw requests but then iterated over all pre-built NetworkFormatter instances from handle(), ignoring the paginated subset
  • Fixed by applying pagination to the formatter array directly, matching the pattern already used correctly by console message pagination
  • Also removed a redundant re-fetch of raw network requests in format() since the formatters from handle() already contain the filtered data

Test plan

  • Existing pagination tests updated to verify correct paginated output
  • returns first page by default - now only includes 10 of 30 requests
  • returns subsequent page when pageIdx provided - shows correct page slice
  • handles invalid page number by showing first page - shows first page subset
  • All other McpResponse tests continue to pass

Network request pagination was only cosmetic - the pagination header
showed "Showing 1-10 of 30" but all 30 requests were rendered in both
the text and structured content output.

The format() method was computing pagination on raw requests but then
iterating over all pre-built NetworkFormatter instances from handle().
Fix by applying pagination to the formatter array directly, matching the
pattern already used by console message pagination.

Also removed a redundant re-fetch of network requests in format() since
the formatters from handle() already contain the filtered data.
@google-cla
Copy link
Copy Markdown

google-cla bot commented Feb 16, 2026

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.

@OrKoN OrKoN requested a review from nroscino February 16, 2026 08:52
@OrKoN
Copy link
Copy Markdown
Collaborator

OrKoN commented Feb 16, 2026

@nroscino PTAL

@nroscino
Copy link
Copy Markdown
Contributor

This #980 addresses the issue without deleting unnecessary code. Closing.

@nroscino nroscino closed this Feb 17, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 17, 2026
madhaviai pushed a commit to madhaviai/chrome-devtools-mcp that referenced this pull request Feb 17, 2026
wolfib pushed a commit to wolfib/chrome-devtools-mcp that referenced this pull request Mar 10, 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.

4 participants