Commit 73715af
committed
Fix cancelled HTTP requests showing as Pending in DevTools Network tab (flutter#9685)
## Description
This PR fixes an issue where cancelled HTTP requests appear as "Pending" in the DevTools Network tab.
When a request is aborted (for example using `HttpClientRequest.abort` or Dio cancellation), DevTools keeps the request in a Pending state because no response is received. This change detects such cases and displays the request status as "Cancelled" instead.
### Changes
- Detect cancelled/aborted requests in `HttpRequestData`
- Display "Cancelled" instead of "Pending" in the Network table
- Ensure cancelled requests are no longer treated as `inProgress`
- Prevent duration from remaining `null` for cancelled requests
- Add a regression test to verify the behavior
- Update `CustomPointerScrollView` to use `cacheExtent` so the project compiles with the current Flutter SDK
All existing network tests pass locally.
Fixes: flutter#9593
![build.yaml badge]
If you need help, consider asking for help on [Discord].
[build.yaml badge]: https://github.com/flutter/devtools/actions/workflows/build.yaml/badge.svg1 parent 92f9d74 commit 73715af
9 files changed
Lines changed: 405 additions & 44 deletions
File tree
- packages
- devtools_app
- lib/src
- screens/network
- release_notes
- test
- screens/network
- test_infra/test_data
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
710 | | - | |
711 | | - | |
712 | | - | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
713 | 721 | | |
714 | 722 | | |
715 | 723 | | |
716 | | - | |
| 724 | + | |
717 | 725 | | |
718 | 726 | | |
719 | 727 | | |
720 | 728 | | |
721 | 729 | | |
722 | 730 | | |
723 | 731 | | |
724 | | - | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
725 | 735 | | |
726 | 736 | | |
727 | 737 | | |
| |||
Lines changed: 47 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
140 | 165 | | |
141 | 166 | | |
142 | 167 | | |
143 | 168 | | |
144 | | - | |
145 | | - | |
| 169 | + | |
146 | 170 | | |
147 | 171 | | |
148 | 172 | | |
| |||
156 | 180 | | |
157 | 181 | | |
158 | 182 | | |
159 | | - | |
| 183 | + | |
160 | 184 | | |
161 | 185 | | |
162 | 186 | | |
| |||
227 | 251 | | |
228 | 252 | | |
229 | 253 | | |
230 | | - | |
231 | | - | |
| 254 | + | |
| 255 | + | |
232 | 256 | | |
233 | | - | |
234 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
235 | 263 | | |
236 | 264 | | |
237 | 265 | | |
| |||
273 | 301 | | |
274 | 302 | | |
275 | 303 | | |
| 304 | + | |
276 | 305 | | |
277 | 306 | | |
278 | 307 | | |
| |||
301 | 330 | | |
302 | 331 | | |
303 | 332 | | |
304 | | - | |
305 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
306 | 340 | | |
307 | 341 | | |
308 | 342 | | |
309 | 343 | | |
| 344 | + | |
| 345 | + | |
310 | 346 | | |
311 | 347 | | |
312 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 88 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
116 | 123 | | |
117 | 124 | | |
118 | 125 | | |
| |||
205 | 212 | | |
206 | 213 | | |
207 | 214 | | |
208 | | - | |
209 | | - | |
210 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
211 | 231 | | |
212 | | - | |
| 232 | + | |
213 | 233 | | |
214 | 234 | | |
215 | 235 | | |
216 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
217 | 240 | | |
218 | 241 | | |
219 | 242 | | |
| |||
253 | 276 | | |
254 | 277 | | |
255 | 278 | | |
256 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
257 | 288 | | |
258 | 289 | | |
259 | 290 | | |
260 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
261 | 301 | | |
262 | 302 | | |
263 | 303 | | |
| |||
341 | 381 | | |
342 | 382 | | |
343 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
344 | 399 | | |
345 | 400 | | |
346 | 401 | | |
| |||
403 | 458 | | |
404 | 459 | | |
405 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
406 | 485 | | |
407 | 486 | | |
408 | 487 | | |
| |||
0 commit comments