Remote form redirect sometimes does not refresh queries in Firefox
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
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 https://github.com/sveltejs/kit/pull/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:
https://github.com/user-attachments/assets/c75f5f48-a1a2-4d28-9dc7-40f0fd06b0a3
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.5
Severity
serious, but I can work around it
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the linked kit-refresh-issue reproduction in Firefox and Chrome, then inspect the redirect query-refreshing code path introduced by PR 16014 and the 2.65.1 changelog entry. Reproduce the case with a shared requireUser remote query; done means the list query refreshes after the remote form redirect in Firefox as it does in Chrome and Safari.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100