Minimal reproduction: a remote form redirect leaves an unmounted-then-remounted
page query stale in Firefox when a query() is awaited in a layout that
persists across the redirect. Chromium and WebKit refetch correctly.
Full write-up (symptom, mechanism, bisect, decisive network signal) is in
ISSUE.md.
Four files under src/:
src/routes/+layout.svelte— awaitsgetUser(); this layout persists across the redirect (the trigger)src/routes/items/+page.svelte— awaitsgetItems(); its component unmounts on the way to/newand remounts on redirectsrc/routes/items/new/+page.svelte—<form {...createItem}>src/routes/items.remote.ts— in-memory array,redirect(303, '/items')after create, no.refresh()anywhere
pnpm install
pnpm dev # or: pnpm build && node build/index.js (adapter-node; set ORIGIN for prod)- Open
/items— 3 items. - Click new (client-side nav) →
/items/new. - Enter a name, submit. Handler pushes to the array and
redirect(303, '/items'). - Back on
/items: the new item is missing (still 3). Reload to see it.
In Chromium/WebKit step 4 shows 4 items.
run.mjs drives the flow with Playwright and reports per-iteration whether the
list went stale, plus the client-side /_app/remote/* request trace. The
decisive signal: after the submit, getItems refetches in Chromium (2 client
calls) but not in Firefox (1 call), while the layout's getUser refetches in
both.
pnpm exec playwright install firefox chromium
# start the dev server first, then point BASE at it:
BROWSER=firefox BASE=http://localhost:5173 N=10 node run.mjs # stale 10/10
BROWSER=chromium BASE=http://localhost:5173 N=10 node run.mjs # stale 0/10Env vars: BROWSER (chromium|firefox|webkit), BASE, N, LABEL, GC=1
(Chromium-only forced GC before submit — the harness refuses GC=1 on other
engines rather than mislabel the run). GC is not required to reproduce; it's
included only to demonstrate the bug is deterministic, not GC-timing-dependent.
kit 2.69.2 · svelte 5.56.4 · vite 8.0.16 · adapter-node 5.5.4 · valibot 1.4.1 · Node 24
(pinned in package.json / pnpm-lock.yaml).