Added size support to Network tab#9744
Open
Victowolf wants to merge 14 commits intoflutter:masterfrom
Open
Conversation
srawlins
approved these changes
Mar 27, 2026
Contributor
srawlins
left a comment
There was a problem hiding this comment.
Looks great, thank you!
packages/devtools_app/lib/src/screens/network/network_request_inspector_views.dart
Outdated
Show resolved
Hide resolved
Contributor
|
Merge in the master branch to resolve that merge conflict. |
srawlins
approved these changes
Mar 27, 2026
Author
|
Hi @srawlins |
srawlins
approved these changes
Mar 28, 2026
Author
|
Hi @srawlins, One test failed: The failing Thanks! |
elliette
requested changes
Mar 30, 2026
packages/devtools_app/lib/src/screens/network/network_request_inspector_views.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/network_screen.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/shared/http/http_request_data.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/network_screen.dart
Outdated
Show resolved
Hide resolved
…ition, simplify code, and revert unnecessary changes
elliette
requested changes
Mar 31, 2026
Member
elliette
left a comment
There was a problem hiding this comment.
Thanks! A few changes but looks good!
packages/devtools_app/lib/src/screens/network/network_screen.dart
Outdated
Show resolved
Hide resolved
…ate units and added tests for responseBytes & formatBytes
Author
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.
Overview
This PR adds support for displaying response payload size in the Network tab
and fixes #6165.
It introduces a new "Size" column in the network requests table and displays response size in the Overview panel of the request inspector.
Changes
1. Data Model Updates
File:
packages/devtools_app/lib/src/screens/network/network_model.dartAdded two new getters to the
NetworkRequestbase class:requestBytesresponseBytesImplemented these getters in the
Socketclass using:writeBytes: request sizereadBytes: response sizePurpose:
Expose byte-level data in a unified way for all network request types.
2. HTTP Data Handling
File:
packages/devtools_app/lib/src/shared/http/http_request_data.dartcontent-lengthheaderStringandList<String>header formatsPurpose:
Provide response size for HTTP requests when available, without requiring changes to the Dart VM.
3. Shared Utility
File:
packages/devtools_app/lib/src/screens/network/utils/http_utils.dartformatBytesinto a reusable utility functionkB,MB) to align with Chrome DevToolsPurpose:
Ensure consistent formatting across the network table and inspector views.
4. Network Table UI
File:
packages/devtools_app/lib/src/screens/network/network_screen.dart-when size is unavailable5. Request Inspector (Overview Panel)
File:
packages/devtools_app/lib/src/screens/network/network_request_inspector_views.dartAdded a new row:
Uses shared
formatBytesutility6. Tests
Added unit tests for:
formatBytesutility inhttp_utils_test.dartresponseBytesparsing logic inhttp_request_data.dartCovers edge cases including:
Why request size is not included
Request size is not reliably available for HTTP requests due to limitations in the current DevTools and VM service APIs:
HttpProfileRequestcontent-lengthare often absent for outgoing requestsWhile socket-level request size (
writeBytes) is available, it is not consistently applicable to HTTP requests.Therefore, including request size would require changes in the Dart SDK / VM layer.
This PR focuses on response size, which can be reliably determined using:
readBytescontent-lengthheader (when present)Screenshot
Future Work
Pre-launch Checklist
General checklist
Issues checklist
Tests checklist
AI-tooling checklist
Feature-change checklist
NEXT_RELEASE_NOTES.md