Skip to content

End calls without a body at their head and let the pulse rest - #18

Merged
tonytonycoder11 merged 2 commits into
mainfrom
end-bodiless-calls-and-rest-the-pulse
Oct 24, 2026
Merged

tonytonycoder11 merged 2 commits into
mainfrom
end-bodiless-calls-and-rest-the-pulse

Conversation

@tonytonycoder11

Copy link
Copy Markdown
Contributor

A call whose response has no body stayed pending for as long as its client lived, with a duration that kept growing. A call used to end when the response stream did, and an app that only looks at the status never reads the stream. A 304 to a conditional request is the usual case, and a 204, the answer to a HEAD request and an answer that says it is empty are the others. Seen in an app that loads its images through a cache: the list filled with 304 rows that read 2 min 1 s and 0 B. A pending call also pulses, so each of those rows kept two animations running.

The recorder now ends a call when it is told the head of such a response: a HEAD request, a 204, a 304 or a content-length of 0. A redirect and a protocol switch are left open, because a client may follow the first and the second carries the bytes of the new protocol. The rule is in the recorder and not in the dart:io capture, so the package:http adapter, which hands its stream to the app the same way, gets it too. These calls now take part in the statistics and are written to disk, as every finished call is. Their duration is the time to the head.

The pulse repeated for as long as it was on screen, so an inspector that was open and idle still drew a frame on every refresh. It now beats three times when it appears and stops. The recording dot also listens to the history and beats again when it changes, so it moves while traffic flows and is still when none does. The same widget started its animation when the system asked for reduced motion and then did not show it, and it no longer does.

Nine tests in the capture suites and three for the inspector fail on main and pass here. Checked against httpbin.org over TLS: a HEAD, a 204, a 304 and an empty 200 end as completed, and a 64 byte body that nobody reads stays pending. The format check, the analyzer, the four test suites and the publish dry run pass locally. It was not run on a device.

What this does not change: a call with a body that the app never reads is still pending until its client is closed, when it is cancelled, and a redirect that the app neither follows nor reads waits the same way. Targets 1.1.0, as two Fixed entries in the changelog.

@trueup-by-nacode-studios

trueup-by-nacode-studios Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

This pull request adds no capability the code did not already have.

9 files read · 908 ms · against a6ebea9 · engine 1.4.1

@tonytonycoder11 tonytonycoder11 moved this to In progress in Flutwire Oct 24, 2026
A response to a HEAD request, a 204, a 304 or an answer that says it is empty has nothing to read, and an app that only looks at the status never reads it, so nothing ended the call and it stayed pending with a duration that kept growing. The recorder now ends such a call when the head is reported. A redirect still waits, because a client may follow it and report the head of what it finds.
The recording dot, and the status and the time of a call that is still running, pulsed for as long as they were on screen, which kept the app drawing a frame on every refresh with nothing else changing. A pulse now beats three times when it appears, the recording dot beats again when the history changes, and then it holds still. It also no longer starts when the system asks for reduced motion, where it used to run without being seen.
@tonytonycoder11
tonytonycoder11 force-pushed the end-bodiless-calls-and-rest-the-pulse branch from 4ce1183 to 2f54ea9 Compare October 24, 2026 18:15
@tonytonycoder11
tonytonycoder11 merged commit e027261 into main Oct 24, 2026
8 checks passed
@tonytonycoder11
tonytonycoder11 deleted the end-bodiless-calls-and-rest-the-pulse branch October 24, 2026 18:21
@tonytonycoder11 tonytonycoder11 moved this from In progress to Shipped in Flutwire Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Shipped

Development

Successfully merging this pull request may close these issues.

1 participant