Skip to content

fix: run navigation hooks when restoring shallow history entries - #17420

Draft
svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/kit-17419-shallow-history-hooks
Draft

svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/kit-17419-shallow-history-hooks

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor
  • The shallow popstate shortcut bypassed the lifecycle introduced in #16449. Keep no-load restoration and reuse the helpers from #16838, rather than forcing a full navigation.
  • Preserve synchronous history bookkeeping from #16959 and aborted-navigation clearing from #17118, while supporting cancellation, awaited hooks, completion, and superseded callback cleanup.
  • Track native hash-entry origins to keep hash-only traversal hook-free inside shallow routing. URL/state equality cannot distinguish native hash entries from deliberate shallow goto entries.
  • Cover same-URL and changed-URL back/forward restoration, async hooks, cancellation, supersession, and native hashes without changing the full-navigation/reload predicate or deprecated push/replaceState command behavior.

Fixes #17419

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 41fed14:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/41fed144d50bd08228ce31c4ff504b3fa4a21aaf

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17420

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Oct 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 41fed14

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigation hooks for shallow routing are skipped when traversing history.

0 participants