Repository navigation
fix: refetch queries after a refreshAll navigation when the cached query survives it - #16546
Nic-Polumeyv wants to merge 6 commits into
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/993601d23b8b9ffbc84c72f17c78dfc3a2371400Open in Note This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed. |
🦋 Changeset detectedLatest commit: 993601d 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 |
…pped resolve.conditions
b2e55e5 to
4df372e
Compare
|
I think we should probably close this in favour of sveltejs/svelte#18594 (just waiting for CI to run on that and we can cut a release) |
|
I'm going to put this in draft to test if #16444 is fully fixed at a later date. Unless you've already tested this and want to close it. |
|
Fixed by sveltejs/svelte#18594, in svelte 5.56.10. |
Replaces #16453 now that main is winding down; fixes #16444.
#promise ??= this.#run()compiles to an unconditional$.set(sveltejs/svelte#18592), so a render that evaluates while the resetting batch from arefreshAllnavigation is still pending reads the pre-reset promise through the batch overlay and writes it straight back, erasing the reset. The deferred restart inclient.jsthen sees a non-null promise and never refetches. Whether the cached query survives the navigation at all is GC timing, which is why this mostly shows up in Firefox.This affects any
refreshAllnavigation: remote form redirects,applyAction,goto(url, { refreshAll: true }). Verified against the reproduction in #16444 on version-3 in Firefox: 10/10 stale before, 0/10 after, with the??=line being the only difference. The spec fails without the runtime change.