You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 53ef0e6
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(web): settle streamed single-flight slices before delivering them (#3865)
* fix(web): settle streamed single-flight slices before delivering them
A collector may fold values that are still pending (the router's collector
returns its preloads' query promises as they stand); the codec streams them
after the response head. The body decode resolves on the first chunk, so the
mutation call resolved and a router action settled (busy cleared, onSettled
ran) before the refreshed route data existed.
deliverFlightData, the delivery path shared by the plain and frames clients,
now waits for every pending slice entry (allSettled) before running the
consumers.
* refactor(web): settle single-flight slices in one Promise.allSettled
Folds settleFlightSlices into one expression in deliverFlightData (no
behavior change) and re-wraps its JSDoc.
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
* chore(size): size exception for settling single-flight slices (#3865)
frames: eager client consumer 13.98 -> 14.02 KB, recorded minified
44,032 B, from Size run 37605412983. Accepted by the maintainer
2026-10-07.
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
---------
Co-authored-by: Ryan Carniato <[email protected]>
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Single-flight delivery now settles slice entries the server folded while still pending before handing the envelope to the flight-data consumers. A collector may fold values that are still in flight (the router's collector returns its preloads' `query` promises as they stand), and the codec streams those after the response head; since the body decode resolves on the first chunk, the mutation call resolved, and a router action settled (busy state cleared, `onSettled` ran) before the refreshed route data existed. `deliverFlightData`, shared by the plain client and the frames client, now waits for every pending entry (`allSettled`, so a failed read stays with the cache entry it seeds) before running consumers.
0 commit comments