Skip to content

fix: rebuild navigation commitment on transition engine - #592

Merged
ryansolid merged 2 commits into
nextfrom
fix/navigate-commit-window
Aug 31, 2026
Merged

fix: rebuild navigation commitment on transition engine#592
ryansolid merged 2 commits into
nextfrom
fix/navigate-commit-window

Conversation

@ryansolid

@ryansolid ryansolid commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the timing-sensitive navigation drop reported in solidjs/solid#3107 by making Solid's transition engine the single source of truth for router navigation.

  • Writes programmatic and native navigation into one canonical location source with engine last-write-wins semantics.
  • Commits history only after the winning transition, including lazy route work, settles.
  • Removes router-owned navigation shadow state and commit-window bookkeeping.
  • Preserves redirect options, pending link/search state, navigation intent, lazy-route error delivery, and native traversal supersession.

Test plan

  • pnpm test — 394 client tests, 33 server tests, and type tests pass against published Solid 2.0.0-rc.4.
  • pnpm build passes.
  • Added stress and characterization coverage for rapid-fire/reentrant navigation, lazy settlement, redirect history policy, native traversal races, intent, and lazy rejection.
  • Consumer bundle: 7.78 KB gzip without data APIs; 10.77 KB with common data APIs.
  • Flat fallback bundle shrinks from 39,890 to 39,279 bytes gzip.

…e reads

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8b3a8c2

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

This PR includes changesets to release 1 package
Name Type
@solidjs/router 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

Use Solid's canonical transition state so winning navigations settle before history commits without router-owned shadow lifecycle state.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ryansolid ryansolid changed the title fix: soft navigations dropped in the commit window fix: rebuild navigation commitment on transition engine Aug 31, 2026
@ryansolid
ryansolid merged commit 94e8011 into next Aug 31, 2026
3 checks passed
@ryansolid
ryansolid deleted the fix/navigate-commit-window branch August 31, 2026 07:36
sparklog pushed a commit to sparklog/solid-v2-todo that referenced this pull request Aug 31, 2026
…solute-URL redirect workaround

Upstream root-caused the silent relative-redirect failure: the commit-window
dedupe in navigateFromRoute compared against a location read that can lag
signal writes by a flush, so a soft navigation could be dropped as
"already there" (solidjs/solid-router#592). Fixed in next.20 by rebuilding
navigation commitment on the transition engine (single canonical location
source, last-write-wins, history written after the winning transition).

- @solidjs/router 2.0.0-next.19 -> 2.0.0-next.20.
- Remove absoluteRedirectTarget (the same-origin absolute-URL workaround):
  login/register/logout are back to plain relative redirect('/'), which
  now navigates reliably.
- Drop the helper's unit test; update the module doc comment.
- Verified in real headless Chrome on a workerd preview: login/register/
  logout all navigate (relative Location: / on the masked 200), wrong
  password still renders the inline error. 52 tests green.
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.

1 participant