Adds WebSocket support to Network panel (GSoC'26) - #9968
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces WebSocket profiling support to the DevTools network screen. It adds a new WebSocket request type, updates the NetworkController and NetworkService to fetch and process WebSocket traffic, and implements UI views (WebSocketFramesView and overview rows) to inspect WebSocket connections and their frames. The review feedback highlights a logical bug in updateLastRefreshTime() where socket refresh is called twice instead of updating the WebSocket refresh time, and suggests wrapping the DataTable in WebSocketFramesView with a horizontal scroll view to prevent layout overflows.
|
For WebSocket frame inspection, should each frame be represented as a separate event in the timeline, or should multiple frames of the same connection be grouped in some way to avoid making the timeline too dense for long-lived connections? |
|
This PR aims to integrate the entire WebSocket support from |
srawlins
left a comment
There was a problem hiding this comment.
Just a preliminary review; I haven't tried it or reviewed the tests.
|
needs review |
|
I'm adding websocket support to the devtools companion app so I can play with this |
|
Yes definitely change vm_service dependency in Yeah 15.3.0 seems to work well. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces WebSocket support to the DevTools Network Profiler, enabling tracking of WebSocket connections, lifecycle events, frame-level inspection, and connection timing. The reviewer provided critical feedback regarding the timing mechanism, pointing out that using wall-clock time instead of the VM's monotonic timeline clock will break profiling. Additionally, the reviewer raised concerns about potential UI jank due to a lack of virtualization in the frames table, missing serialization for offline support, a potential crash when parsing event names without defensive checks, and a duplicated header in the release notes.
|
I like the feedback from Gemini, most looks valid to me at first glance. |
srawlins
left a comment
There was a problem hiding this comment.
Great tests, impl looks good too!
| connection details, lifecycle events, frame-level inspection, and connection | ||
| timing information. | ||
| [#9968](https://github.com/flutter/devtools/pull/9968) | ||
| * Fixed exported response status in HAR files so that they parse as integers |
There was a problem hiding this comment.
This doesn't belong here. Copied?

Fixes #9507
Tracking issue: Victowolf/GSoC-Progress-Tracking#8
This contribution is part of the Google Summer of Code 2026 project:
"Add WebSocket/gRPC support to Flutter DevTools Network Panel"
This PR adds WebSocket support to the Flutter DevTools Network panel.
Previously,
dart:ioWebSocket connections appeared as opaqueSOCKETrequests in the Network screen. This PR extends the existing networking models and UI to recognize WebSocket profiling data and provide dedicated inspection of WebSocket connections and frame activity.What's included
WEBSOCKET.Tests Extended:
network_controller_test.dartnetwork_model_test.dartnetwork_profiler_test.dartnetwork_request_inspector_test.dartnetwork_table_test.dartUpdated UI:
Pre-launch Checklist
General checklist
///).Issues checklist
Tests checklist
AI-tooling checklist
Feature-change checklist
packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.If you need help, consider asking for help on Discord.