page.url doesn't update properly with async svelte.
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
When enabling async Svelte, and you're awaiting promises inside your pages, the navigation will break if you click on multiple links really fast. Faster than your promises resolve.
Svelte will basically just break, and also the page.url will be wrong.
I also think $effect.pending() or navigation.to will get stuck forever.
Reproduction
Just click on multiple links really fast.
https://stackblitz.com/edit/sveltejs-kit-template-default-d1euvfpx?file=src%2Froutes%2F%2Blayout.svelte
Logs
System Info
System:
OS: macOS 26.3
CPU: (10) arm64 Apple M1 Pro
Memory: 83.86 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0 - /Users/.../.nvm/versions/node/v22.12.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.9.0 - /Users/.../.nvm/versions/node/v22.12.0/bin/npm
pnpm: 10.5.2 - /opt/homebrew/bin/pnpm
bun: 1.3.9 - /opt/homebrew/bin/bun
Deno: 2.2.4 - /opt/homebrew/bin/deno
Browsers:
Chrome: 145.0.7632.117
Firefox: 147.0.4
Safari: 26.3
npmPackages:
@sveltejs/adapter-auto: ^7.0.1 => 7.0.1
@sveltejs/enhanced-img: 0.10.2 => 0.10.2
@sveltejs/kit: ^2.53.4 => 2.53.4
@sveltejs/vite-plugin-svelte: 6.2.4 => 6.2.4
svelte: 5.53.6 => 5.53.6
vite: ^7.3.1 => 7.3.1
Severity
blocking an upgrade
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
Start with the linked StackBlitz reproduction and reproduce rapid navigation between pages that await promises with async Svelte enabled. Trace the navigation state, page.url, $effect.pending(), and navigation.to while links are clicked quickly; done means navigation completes without breaking and these values remain correct.
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
- Needs clarification
- Newbie friendliness
- 40/100