Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

kit-refresh-issue

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.

The app

Four files under src/:

  • src/routes/+layout.svelte — awaits getUser(); this layout persists across the redirect (the trigger)
  • src/routes/items/+page.svelte — awaits getItems(); its component unmounts on the way to /new and remounts on redirect
  • src/routes/items/new/+page.svelte — <form {...createItem}>
  • src/routes/items.remote.ts — in-memory array, redirect(303, '/items') after create, no .refresh() anywhere

Run it

pnpm install
pnpm dev            # or: pnpm build && node build/index.js  (adapter-node; set ORIGIN for prod)

Manual repro (Firefox)

  1. Open /items — 3 items.
  2. Click new (client-side nav) → /items/new.
  3. Enter a name, submit. Handler pushes to the array and redirect(303, '/items').
  4. Back on /items: the new item is missing (still 3). Reload to see it.

In Chromium/WebKit step 4 shows 4 items.

Automated harness

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/10

Env 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.

Versions

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).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages