Problem
When a test is flaky because of a race between a UI action and an in-flight network request, the answer should be derivable from playwright trace output: compare when the request was in flight with when the action ran. Today it isn't, for two reasons:
trace requests prints only a duration for each request — no start time — while trace actions prints per-action start times. There is nothing on the request side to line up against the action clock.
- Failed and
route.abort()ed requests never get an end recorded at all: the failure path leaves the HAR entry's time at its -1 default, so even the raw trace data cannot say when such a request stopped.
Proposal
- When tracing, record a duration for failed/aborted requests, derived from the entry's monotonic start stamp. User-exported HAR files keep the spec-defined value.
- Add a
Start column to trace requests using the same clock and format as the trace actions Time column, and a matching start: line to trace request <id>.
With both in place, "was this request still outstanding when this action ran (or finished)?" becomes a plain timestamp comparison over CLI output.
Problem
When a test is flaky because of a race between a UI action and an in-flight network request, the answer should be derivable from
playwright traceoutput: compare when the request was in flight with when the action ran. Today it isn't, for two reasons:trace requestsprints only a duration for each request — no start time — whiletrace actionsprints per-action start times. There is nothing on the request side to line up against the action clock.route.abort()ed requests never get an end recorded at all: the failure path leaves the HAR entry'stimeat its-1default, so even the raw trace data cannot say when such a request stopped.Proposal
Startcolumn totrace requestsusing the same clock and format as thetrace actionsTime column, and a matchingstart:line totrace request <id>.With both in place, "was this request still outstanding when this action ran (or finished)?" becomes a plain timestamp comparison over CLI output.