Repository navigation
fix(query): stamp query flights with their fetch's start - #685
Merged
Merged
Conversation
query() hands each reader a fresh `.then` wrapper over the fetch. A route's preload starts the fetch; the page reads it a render pass later behind its lazy chunk, and the waterfall checks (ASYNC_WATERFALL on the client, SSR_BOUNDARY_WATERFALL on the server) read that wrapper as work that only started then. Stamp the fetch when it starts and each wrapper with the fetch's start through `OBSERVE.attribution.markFlight` (solidjs/solid#4108). Observe and dev only: `OBSERVE` folds out of shipped bundles, and a solid-js without the stamp functions is left alone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LY7F9czoRqdMEvk2QwPr1
🦋 Changeset detectedLatest commit: 97b22e9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
ryansolid
marked this pull request as ready for review
October 16, 2026 05:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: a route's preload starts a
query()fetch, and the page reads it a render pass later, behind its lazy chunk. The read gets a fresh.thenwrapper, so in dev and observe builds both waterfall checks (the client'sASYNC_WATERFALLand the server'sSSR_BOUNDARY_WATERFALL) treat the work as starting at the read. That turns parallel route data into a false waterfall lead (solidjs/solid#4105).After:
query()stamps the fetch when it starts, and stamps each wrapper it hands out with that same start, throughOBSERVE.attribution.markFlight. Both checks then see the data was already in flight and leave it out of the chain.How: one internal
stampFlighthelper, called at the fetch and insettle(). Both calls sit behindOBSERVE &&, the same pattern the router already uses forwithOrigin, so they fold out of shipped bundles. The slot'smarkFlightandflightOrigincome from solidjs/solid#4108. They're called optionally, so asolid-jswithout them is left alone.Tests: the new
test/data/query-flight-stamp.spec.tscovers a preloaded fetch read later through a wrapper, a fresh fetch, and an oldersolid-js. The first two fail without the change. The full suite passes (711 client + 96 server), and so dotscand prettier.🤖 Generated with Claude Code
https://claude.ai/code/session_018LY7F9czoRqdMEvk2QwPr1
Generated by Claude Code