Describe the bug
When a remote form function rehreshes a query and then redirects, the query is fetched again after the redirect (if it is used on that page). I would have exptected it to use the fresh data retured from the form function after the redirect. If not, I guess there is no way to do single-flight mutation when using redirect.
Reproduction
https://www.sveltelab.dev/5uaeob2ogwsg968?files=.%2Fsrc%2Flib%2Fdata.remote.js
- Click edit
- Submit the form
- Notice the network traffic:
remote (contains data):
refreshes: "[{\"1t2evzh/data/\":1},{\"type\":2,\"data\":3},\"result\",3]"
data (is fetched anyway):
result: "[3]"
type: "result"
Logs
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 22.22.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
@sveltejs/adapter-auto: ^3.0.0 => 3.3.1
@sveltejs/kit: ^2.5.27 => 2.57.1
@sveltejs/vite-plugin-svelte: ^5.0.0 => 5.1.1
svelte: ^5 => 5.55.4
vite: ^6.0.0 => 6.4.2
Severity
annoyance
Additional Information
No response
Describe the bug
When a remote form function rehreshes a query and then redirects, the query is fetched again after the redirect (if it is used on that page). I would have exptected it to use the fresh data retured from the form function after the redirect. If not, I guess there is no way to do single-flight mutation when using
redirect.Reproduction
https://www.sveltelab.dev/5uaeob2ogwsg968?files=.%2Fsrc%2Flib%2Fdata.remote.js
Logs
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 22.22.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.8.2 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: @sveltejs/adapter-auto: ^3.0.0 => 3.3.1 @sveltejs/kit: ^2.5.27 => 2.57.1 @sveltejs/vite-plugin-svelte: ^5.0.0 => 5.1.1 svelte: ^5 => 5.55.4 vite: ^6.0.0 => 6.4.2Severity
annoyance
Additional Information
No response