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
Remote form redirect sometimes does not refresh queries in Firefox #16444
My understanding is when a form remote function redirects, all queries should be invalidated by default. Ever since version 2.65.1 I've found that occasionally, in Firefox only (not Chrome/Safari), when I navigate from a list view to a new form, submit the form using a remote form function which redirects back to the list view, the list is not always updated. This only happens when there is another remote query in the layout (in my case, a requireUser query) that is shared across the list and new form routes. What happens is only the requireUser query is refreshed.
Likely introduced by #16014 which is in the code path for refreshing queries after redirect and listed in the 2.65.1 changelog.
Reproduction
Here is a video demonstrating the issue:
Screen.Recording.2026-07-20.at.3.02.08.PM.mp4
Here is https://github.com/davekaro/kit-refresh-issue to a purely AI generated reproduction with scripts to verify works in Chrome but not in Firefox. Also, this repo includes the SvelteKit app from the video above that demonstrates the issue.
Reproduced on Linux (Firefox stale 5/5, Chromium 0/5), traced with logging added to kit 2.70.1 inside the repro.
In Chromium the old page's getItems cache entry is GC-evicted before the redirect, so the remount builds a fresh Query and always fetches. In Firefox the entry is still cached, reset() runs on it, and the remount reuses it. There the reset lands and stays intact in source.v, but #get_promise compiles to
an unconditional $.set of whatever was read, where plain JS ??= would skip the write. The remount render evaluates while the reset batch is still pending, so the read goes through the time-travel overlay, returns the pre-reset promise, and the $.set writes it back permanently. The deferred restart in _goto then sees a non-null promise and never fetches. The unconditional $.set for ??= seems worth a Svelte issue on its own.
The persistent layout query is the trigger. Resetting it re-fires its await mid-navigation, keeping the reset batch pending across the destination render. That's the engine-sensitive part. Forcing the reused path in Chromium by pinning the entry stays correct, because there the reset batch commits before the render.
#16273 is a different symptom that also points at #16014.
Describe the bug
My understanding is when a form remote function redirects, all queries should be invalidated by default. Ever since version 2.65.1 I've found that occasionally, in Firefox only (not Chrome/Safari), when I navigate from a list view to a new form, submit the form using a remote form function which redirects back to the list view, the list is not always updated. This only happens when there is another remote query in the layout (in my case, a requireUser query) that is shared across the list and new form routes. What happens is only the requireUser query is refreshed.
Likely introduced by #16014 which is in the code path for refreshing queries after redirect and listed in the 2.65.1 changelog.
Reproduction
Here is a video demonstrating the issue:
Screen.Recording.2026-07-20.at.3.02.08.PM.mp4
Here is https://github.com/davekaro/kit-refresh-issue to a purely AI generated reproduction with scripts to verify works in Chrome but not in Firefox. Also, this repo includes the SvelteKit app from the video above that demonstrates the issue.
Logs
System Info
System: OS: macOS 26.5.2 CPU: (12) arm64 Apple M3 Pro Memory: 262.16 MB / 36.00 GB Shell: 4.7.1 - /opt/homebrew/bin/fish Binaries: Node: 26.5.0 - /Users/dave/.local/share/mise/installs/node/latest/bin/node npm: 11.17.0 - /Users/dave/.local/share/mise/installs/node/latest/bin/npm pnpm: 11.13.0 - /Users/dave/.local/share/mise/installs/pnpm/latest/pnpm bun: 1.3.14 - /Users/dave/.local/share/mise/installs/bun/latest/bin/bun Deno: 2.8.2 - /opt/homebrew/bin/deno Browsers: Chrome: 150.0.7871.128 Firefox: 152.0.6 Safari: 26.5.2 npmPackages: @sveltejs/adapter-node: 5.5.7 => 5.5.7 @sveltejs/kit: 2.70.1 => 2.70.1 @sveltejs/vite-plugin-svelte: 7.2.0 => 7.2.0 svelte: 5.56.6 => 5.56.6 vite: 8.1.5 => 8.1.5Severity
serious, but I can work around it
Additional Information
No response