0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00

Compare commits

...

57 commits

Author SHA1 Message Date
Sheraff
8a7bf784d6
test: assert match loading through public behavior 2026-07-11 11:35:02 +02:00
Sheraff
ed8f5d19dc
fix try/finally blocks in unit tests 2026-07-11 11:35:02 +02:00
Sheraff
3216bf4611
more edge cases 2026-07-11 11:35:02 +02:00
Sheraff
9e5200d08e
test: rewrite PR 7744 internals assertions 2026-07-11 11:28:51 +02:00
autofix-ci[bot]
89c4321c1e
ci: apply automated fixes 2026-07-10 12:44:29 +00:00
Sheraff
4da6ecef2d
bundle size improvements 2026-07-10 14:42:18 +02:00
Sheraff
1f917616ab
perf: gzip shape alignment, dead solid scroll-restoration husk, single-use helper inlines
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 19:46:20 +02:00
Sheraff
f4b56fe3ae
perf: recover gzip bytes in lane-model client code and match components
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 15:13:12 +02:00
autofix-ci[bot]
3cc89701f2
ci: apply automated fixes 2026-07-07 12:36:52 +00:00
Sheraff
38470e34c6
docs: declare removed public API in the changeset and update RouterType docs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 14:34:45 +02:00
Sheraff
f9182086b2
refactor: remove solid pendingRouteIds suppression and unreachable outlet guards
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 14:34:45 +02:00
Sheraff
75c0d25a52
fix: detect webpack/rspack ChunkLoadError in module-not-found recovery; pin issue regressions
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 14:34:45 +02:00
Sheraff
4588e4515e
fix: fuzzy 404s honor layout notFoundComponents; preloads keep borrowed cache entries on gcTime
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 14:34:45 +02:00
Sheraff
85b9079e89
fix: vue onResolved/onRendered emit real location change info
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 14:34:45 +02:00
Sheraff
886050c36c
fix: run server chunk failures through the route failure lifecycle and cap ssr() notFound prefixes
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 14:34:45 +02:00
Sheraff
98c8c27841
fix: scope built-location currentness to preload passes and surface fatal load rejections
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 14:34:40 +02:00
Sheraff
f89dc959ff
refactor: discover preload donors at loader time instead of threading a join handle
Inspired by main's original adoption shape (the join point was the
match's own discoverable state, not plumbing): the loader phase now looks
the donor up directly in router._preloadLanes, deleting the _.preloadLane
private field, the Matches type addition, and the per-match lane scan in
matchRoutesInternal's hot path. The adoption gate excludes a preload
pass's own registered lane so the synchronous loader-start contract holds
for solo preloads too.

A preload completing in the microtask window between matchRoutes and the
loader phase is deliberately NOT adopted — the navigation runs its own
loader, which is correct, just not deduplicated; guarding that window was
a hedge whose failure mode is a duplicate fetch, not a defect.

Net vs the handle version: two files instead of four, no hot-path work,
and marginally smaller bundles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 18:58:38 +02:00
autofix-ci[bot]
6dcb32cfbc
ci: apply automated fixes 2026-07-04 16:47:53 +00:00
Sheraff
bcc23d84df
feat: navigations adopt in-flight preload loader runs (data-only)
Restores the essential hover-preload contract — click during an in-flight
preload executes the loader ONCE — without resurrecting the old join's
bug classes:

- Data only, never control flow: a donor preload that ends in redirect/
  notFound/error is ignored and the navigation runs its own loader, so
  preload-computed redirects can no longer hijack navigations (the
  redirect regression test now pins non-leakage AND the retry).
- The navigation always runs its own beforeLoad with preload:false
  semantics (the old join's context-mismatch class stays dead).
- Private preload lanes register in router._preloadLanes; matchRoutes
  attaches a join handle; the loader phase adopts via the shared
  loadPromise. Joining is gated on the donor's loader being in flight —
  before that, the preload's serial phase may itself be waiting on this
  navigation through the borrow protocol, and joining would deadlock the
  pair (pinned by a serial-phase test). Concurrent sibling preloads of
  the same route also dedupe to one loader run.
- No cache pollution: lanes stay private until success, unchanged.

The adoption await is gated on the join handle so the synchronous
loader-start contract is untouched for the no-preload case.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 18:45:54 +02:00
autofix-ci[bot]
ccf92bcb8b
ci: apply automated fixes 2026-07-04 15:48:26 +00:00
Sheraff
a70abdd565
refactor: delete hedges against invariants the model already guarantees (frameworks)
Framework half of the trust-the-model sweep:

- Vue's Transitioner adopts the single-emitter shape react uses:
  synchronous store subscriptions drive one emitEdges instead of three
  watch pipelines over usePrevious edges; the transition edge stays
  flush-coupled via nextTick for the onResolved event, while the
  idle/resolvedLocation commit happens on the first falling edge —
  joining the same reactive flush as the matches commit, so
  matchRoute/status consumers can never render one flush behind the
  committed lane. Navigations now produce one fewer store flush across
  the board (pinned counts updated downward).
- Vue and Solid useMatch drop the hasPendingMatch throw-suppression
  guards and the pendingMatchContext/pendingRouteIds plumbing that fed
  them: atomic pending publication means a match the store publishes is
  always judgeable, matching react's semantics (changeset documents the
  Vue behavior change).

Full suites green (router-core 1492, react 938, solid 818+server-mode,
vue 789 incl. the conditional-Link regression this rework surfaced and
fixed), react selective-ssr e2e green. Bundle: −30 to −218 B gzip on
every measured target.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 17:46:22 +02:00
Sheraff
e9deed2277
refactor: delete hedges against invariants the model already guarantees (core)
Trust-the-model sweep over the combined diff, core half — every deletion
adversarially verified against INTERNALS and the suites:

- Dead mechanism: the server redirect path's write-only match._.error
  (vestige of main's removed 'redirected' status; its only reader is the
  client-only preload borrow protocol), the reloadDocument carve-out in
  the server redirect short-circuit (client-navigation concept), and the
  rendered field's never-used promise arm — onReady is now a void
  callback and publication is synchronous by contract.
- Duplicate signal writers: finalizeRouteFailure's notFound branch no
  longer sets requiresCommit (this branch always throws; the
  loadClientRouter catch owns the flag for thrown outcomes), and
  backgroundOnly drops its !rendered condition (pending publication
  implies requiresCommit).
- Unreachable defenses: the serial loop's badIndex condition (badIndex
  is loader-phase-only by construction), the server finalizer's
  missing-match guard (the linear server lane cannot shorten mid-
  finalizer), redundant ownership re-checks with no async gap, and the
  background chunk catches' sentinel classification that duplicated the
  following isCurrentOrCancel.
- One owner per rule: recordBeforeLoadFailure takes the pass controller
  instead of re-deriving it, and commitServerNotFoundBoundary now uses
  the shared getNotFoundBoundaryPatch.

Each deleted hedge leaves a one-line invariant comment where a future
reader might be tempted to re-add it. Full router-core suite green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 17:30:54 +02:00
Sheraff
022395e199
refactor(react-router): one deterministic emitter for the load lifecycle
The Transitioner carried two emission pipelines: render-observed
usePrevious edges (lossy by design — React batching can hide a flip
inside one commit) and the mount-load repair, with a setTimeout(0)
arbitrating between them. Both are replaced by a single emitter driven
by synchronous store subscriptions (isLoading/hasPending), which cannot
miss an edge, plus one render-coupled signal for onResolved: a commit
tick bumped inside the transition and observed by a layout effect, so
resolution still lands after React committed the transition render. A
counter rather than a boolean so nested transitions (invalidate inside a
user startTransition) can never coalesce into an unobservable no-change.

No timer, no arbitration, no repair block, and the mount load reduces to
a bare router.load() — its own isLoading toggle through the armed
subscriptions is the deterministic signal even for loads that settled
before mount (the memory-benchmark case, re-verified: no hang). Net
smaller than the file it replaces.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 16:12:13 +02:00
autofix-ci[bot]
d5a59102f7
ci: apply automated fixes 2026-07-04 13:35:31 +00:00
Sheraff
4d9e0e760d
refactor: remove unnecessary mechanism across the match-loading pipeline
Complexity sweep over the combined #7637+#7744 diff (23 verified
simplifications; every candidate adversarially checked for behavior
preservation against INTERNALS and the test suite):

- One flag instead of two for pending publication (pendingPublished
  folded into rendered); serial failures live on inner.serialFailure
  instead of a local mirrored by a temporary background-null bracket
  (retained ancestors now gate background selection explicitly).
- Provably-dead code deleted: finalizeRouteFailure's never-passed
  componentFailure parameter, an unreachable lane-shortening guard, the
  join's pre-wait aborted check, three sync-gap currentness re-checks in
  the background path, the server-side latestLoadPromise clear, two
  unreachable isServer branches in react Match, and the supersession
  drain loop's impossible-state guards (with a new multi-supersession
  pinning test).
- One owner per rule: the serial-failure loader-prefix cap is a shared
  helper used by both client and server (new foreground-lane pinning
  test); matchRoutesInternal derives context through getMatchContext;
  invalidate() uses one parameterized updater; cancelMatches reads its
  known pool directly; the server reduction uses Promise.allSettled.
- Vestigial indirection dropped: hydrate()'s follow-up load microtask
  deferral, solid's createResource microtask yield and armPending
  wrapper, ssr-client's duplicate route.options.ssr write, the
  loadedMatches/matches aliases, and stores.ts's initial-state object
  for five compile-time constants.

Bundle: −95 to −150 B gzip (−300 to −494 B raw) on every measured
target across react/solid/vue and vite/rsbuild. All suites green
(router-core 1492, react 941, solid 821+server-mode, vue 791) plus
react/solid selective-ssr e2e.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 15:33:30 +02:00
Sheraff
c9efc46097
refactor: single-shot foreground wait in the preload borrow protocol
Replace the counter-capped wait loop with the deterministic contract the
protocol originally had: if the borrowed owner is mid-navigation, await
the current foreground load exactly once and re-read. An owner that
still has not committed after that belongs to a newer navigation, and
the speculative pass yields via the ownership sentinel. Zero or one
await by construction — no arbitrary iteration bound. INTERNALS and the
churn regression test updated to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 14:20:47 +02:00
Sheraff
354d659310
fix: address delta-review findings
- joinPreloadedActiveMatch's foreground wait is now bounded: a
  speculative preload drops its pass (ownership sentinel) instead of
  outwaiting sustained navigation churn, where every iteration picked up
  the replacement latestLoadPromise and awaiters never settled. Covered
  by a churn regression test with signal-aware loaders.
- The react Transitioner stuck-pending repair now also emits
  onLoad/onBeforeRouteMount/onResolved — deferred one macrotask so the
  normal effect pipeline (which sets status idle) always wins arbitration
  and events cannot double-fire; only genuinely unobserved loads repair.
- Server asset projection no longer abandons a pending async head()/
  scripts() when a sync throw coincides with an async headers(): the
  response waits on headers regardless, so that case now flows through
  the generic per-kind branch and commits everything that settles. This
  also removes the duplicated commit+recurse continuation.
- Restores solid-router's server-mode test suite ('vitest --mode
  server'), accidentally dropped from test:unit by a concurrent agent
  edit swept into an earlier commit; the suite passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 13:42:34 +02:00
Sheraff
77ec643b31
docs: cover the remaining behavior changes in the changeset
pendingMs-0 synchronous publication, narrowed cancelMatches, exiting-
match cache preservation at pending publication, dehydrated boundary
replay, and async headers() always awaited.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 12:53:35 +02:00
Sheraff
e1f2a7ce2c
docs: reconcile INTERNALS.md with the final ready-branch semantics
Nine corrections from a full consistency pass: pendingMs-0 synchronous
publication, the preload borrow wait/re-read loop and failure-path
prefix caching, load-chain settlement for superseded loads, per-type
chunk cache with settled-preload eviction (incl. lazyFn rejections),
narrowed cancelMatches, per-kind server asset commit with async headers
always awaited, hydration's ssr:false asset skip, loadPromise AND
dehydrated marker both surviving rematch, and the previously
undocumented dehydrated-boundary replay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 12:53:11 +02:00
autofix-ci[bot]
69cf2fbcac
ci: apply automated fixes 2026-07-04 09:57:47 +00:00
Sheraff
3867af1740
fix: drop unnecessary type assertions in issue-7638 regression test
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 11:55:44 +02:00
autofix-ci[bot]
3ebb72e254
ci: apply automated fixes 2026-07-04 09:24:36 +00:00
Sheraff
39e8fe573b
fix(solid-router): render hydration display pending through the shared ClientOnly slot
The outer _displayPending branch made the hydrating client render the
pending fallback at a different structural depth than the server (which
renders it through ClientOnly's fallback), so Solid's dev runtime threw
'Hydration Mismatch' and cascaded into 'template is not a function' via
the root CatchBoundary — dev-mode-only because prod silently falls back
to client rendering. This regressed data-only+pendingComponent routes vs
main and was also the mechanism behind the pre-existing #7283
(ssr:false+pendingComponent, broken on main too). _displayPending now
renders inside MatchInner, which only mounts after ClientOnly hydrates —
outside the hydration key sequence — fixing both cases. Adds a dev-server
e2e spec covering both.

Fixes #7283

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 11:22:38 +02:00
Sheraff
60eb5977e3
test: pin 24 community-reported issues fixed by the match-loading work, fix pendingMs-0 blank frame
Issue sweep across open issues/PRs overlapping this branch's scope. Each
issue got a repro test asserting the desired behavior:

- Fixed by this work (tests pass): #7602, #7457, #7367, #7635, #4684,
  #6221, #7379, #4696, #4444, #6107, #5106, #7638, #4572, #3179, #4112,
  #2980, #2905, #2182, #3928, #6371 — plus test ports pinning the intent
  of external PRs #7003, #7051, #6645, #7114 (via #7110 repro) and #4614.
- Fixed here: #4759 — a pendingMs-0 pending publication deferred to a
  macrotask painted one blank frame on bare initial loads; publication is
  now synchronous when nothing is rendered yet (the timer path stays for
  displayed content, whose later snapshot is fresher).
- Known gap kept as an expected failure: #5778 — preloads borrowing an
  active ancestor derive context from its committed snapshot, not live
  router.options.context; fixing means changing the read-only borrow
  protocol (dedicated follow-up). The documented invalidate() workaround
  is pinned.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 11:22:38 +02:00
autofix-ci[bot]
eb9a47f74b
ci: apply automated fixes 2026-07-04 08:28:52 +00:00
Sheraff
01dc55e704
fix: preserve the dehydrated marker when a rematched match keeps its loadPromise
matchRoutesInternal's lane copy kept EITHER the existing loadPromise OR
the dehydrated marker. A dehydrated match can legitimately hold a
pending loadPromise during hydration, and dropping the marker made the
same-href follow-up load treat it as an ordinary stale stay match —
re-running server loaders client-side (selective-ssr/spa-mode e2e:
root-loader showed 'client' instead of 'server'). The base branch never
hit this only because its unconditional cancelMatches settled every
active match's promise before rematching.

Adds a hydrate-level regression test for server data preservation across
the follow-up load and a client navigation, plus a react-router contract
test that a load settling before RouterProvider mounts still resolves
router status and fires onRendered (the deterministic guard for the
original 6h hang remains the memory-client:react benchmark).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 10:27:00 +02:00
Sheraff
4917900c3a
fix(react-router): repair stuck pending status after unobserved mount loads
A load that settles before the Transitioner can observe the isLoading
flip (started before mount, or completing within the mount effect's
batch) left router status stuck at 'pending' forever — onResolved and
onRendered never fired. This deadlock pre-dates this branch (present on
fix-match-loading, absent on main) and hung the memory-client:react
CodSpeed job for 6 hours. Repair after the mount load exactly like
ssr-client does after its follow-up load.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 09:25:06 +02:00
Sheraff
9f79e982ce
fix: resolve CI type errors from PR self-review pass
- handle-route-update.ts referenced oldRoute._componentPromises (added in
  the self-review commit to also clear the per-component chunk-load cache
  on HMR) but the plugin's local AnyRouteWithPrivateProps shadow type only
  declared _componentsPromise, breaking router-plugin's build and
  test:types (TS2551).
- route-assets.server.ts no longer needs the `headers as Promise<any>`
  cast after the isPromise() type-guard already narrows the `any`-typed
  headers variable; eslint's no-unnecessary-type-assertion flagged it as
  an error, failing router-core's test:eslint.
- background-assets-stale.test.ts accessed loaderData.title without a
  null check inside an inline head() callback, where TS strictly types
  AssetFnContextOptions.loaderData as optional (it's only assigned once
  the loader settles). Other tests dodge this because they wrap head in
  vi.fn(), which loses the contextual typing; this test defines head
  inline so the strict type applied, breaking test:types and test:unit's
  typecheck pass. The loader in this test always resolves before head
  runs, so a non-null assertion is safe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 09:15:47 +02:00
autofix-ci[bot]
43ff0726a1
ci: apply automated fixes 2026-07-04 00:07:09 +00:00
Sheraff
1be22be01f
fix: address self-review findings on the review branch
- Server asset projection awaits a pending async headers() even when a
  decorative head()/scripts() hook throws synchronously — route headers
  are response behavior and are never dropped for a decorative failure.
- cancelMatches treats any fetching marker (beforeLoad included) as
  in-flight work when deciding to abort an active match.
- A rejected lazy-route chunk promise is evicted so the next load
  generation retries the import instead of replaying the failure forever.
- commitFinalMatches isolates onLeave from the same index's
  onEnter/onStay, so a throwing leave hook cannot skip the entered
  route's hooks; exiting-match cache preservation is shared between
  pending publication and final commit via one helper.
- joinPreloadedActiveMatch's wait/re-read stanzas are unified into one
  loop that also survives a newer load re-publishing a pending lane.
- HMR route updates clear the new per-type component chunk cache.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:05:10 +02:00
Sheraff
beed0d226b
perf: avoid per-commit Set allocations in match cache reconciliation
The exiting/cached id scans operate on small arrays; linear some() scans
drop two Set allocations per final commit and per pending publication.
Bundle-size impact is neutral (gzip); measured across all targets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 01:16:20 +02:00
autofix-ci[bot]
142915cb7d
ci: apply automated fixes 2026-07-03 23:10:49 +00:00
Sheraff
a9e6ce220d
fix: replay dehydrated notFound/error boundaries in the follow-up client load
When the server caps the match lane at a notFound/error boundary, the
follow-up client load after hydration skipped the dehydrated parent's
beforeLoad and happily loaded, committed, and asset-projected the child
routes the server omitted — injecting head/scripts computed from missing
loader data. A dehydrated failure boundary now replays as the pass's
serial failure, capping the lane exactly like the server did.

Also excludes /hydration-capped-assets from the e2e prerender crawl (the
route 404s by design).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 00:57:42 +02:00
Sheraff
00108a4ea8
fix: drop unnecessary type assertion in server asset projection
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 00:13:58 +02:00
Sheraff
ff13fb21a3
docs: document behavior changes in the match-loading changeset
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:43:54 +02:00
Sheraff
e154e904b3
refactor: share byte-identical twin helpers and trim dead server-load code
- commitMatch and getLoader move to the shared load-matches.ts (they were
  byte-identical in the client/server twins; getLoader was additionally
  re-inlined in the server loader path).
- loadServerMatches no longer copies preload/background/onReady/forceReload
  into its context — those are client-side semantics the server pipeline
  never reads.
- loadServerRouter's catch no longer duplicates the 404/500/200 derivation
  that the committed-match pass below already owns.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:41:45 +02:00
Sheraff
2ac3031a0f
feat: cache the successful ancestor prefix of a failed preload
A descendant notFound/error no longer discards successful expensive
ancestor loads: the leading run of success matches is projected and
cached (owned matches only), so repeated hovers and the eventual
navigation reuse them within preloadStaleTime. Failed, pending, and
borrowed entries still never enter the cache.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:38:20 +02:00
Sheraff
1f53606a77
fix: decouple boundary chunk loading from the whole-route preload and normalize chunk failures
- loadRouteChunk(route, componentType) now tracks per-component-type
  in-flight preloads: targeted boundary requests join their own type's
  chunk instead of awaiting (and inheriting failures from) the unrelated
  whole-route _componentsPromise. Full preloads start fresh so a new load
  generation never couples to a stale generation's boundary chunk, and
  rejections are evicted instead of cached forever.
- Primary route chunk failures (lazyFn/component preload) go through
  normalizeRouteFailure like loader failures, so route onError fires and
  thrown redirects/notFounds are honored; boundary component chunk
  failures still commit directly (recursion guard).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:36:22 +02:00
Sheraff
8d7c9f1b33
fix: make route asset projection failure semantics coherent across server, background, and hydration
- Server projection commits head/scripts/headers independently so a
  failing decorative hook no longer drops route headers (response
  behavior). Sync throws still abandon pending async hooks without
  blocking the response, owning their rejections.
- Background reloads only publish when asset projection for the fresh
  data succeeded, keeping the data+assets commit atomic instead of
  exposing new loaderData under stale meta.
- Hydration no longer executes head()/scripts() for ssr:false matches,
  including children the server intentionally omitted at an error/
  notFound boundary; the follow-up client load projects assets for the
  lane it actually commits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:25:09 +02:00
Sheraff
5f86055de2
fix: preserve exiting success matches in cache at pending publication
Publication evicts the previous active lane from every pool; if the load
is then superseded (back navigation), the final commit that would have
cached those matches never runs and fresh within-staleTime data is lost,
forcing a spurious loader re-run. Cache exiting success matches at
publication (mirroring main's onReady) and dedupe against them in
commitFinalMatches.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:20:47 +02:00
Sheraff
85bcb58810
fix: keep client load errors observable instead of swallowing them
- loadClientRouter's outer catch re-surfaces non-redirect, non-sentinel
  failures (asset projection, view transitions, lifecycle hooks) as
  unhandled rejections instead of silently dropping them.
- commitFinalMatches wraps each lifecycle hook so a throwing
  onEnter/onStay/onLeave stays observable without skipping the remaining
  hooks or corrupting the committed transition.
- React's startTransition clears isTransitioning in a finally block so a
  throwing commit cannot permanently block onResolved/idle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:18:32 +02:00
Sheraff
a6cd9bac50
fix: only cancel active matches with in-flight work in cancelMatches
Aborting every active match's controller at load start killed deferred/
streamed data tied to a success stay-match's loader signal on any child
navigation or invalidate(), landing AbortError in <Await> boundaries.
Restore main's filter (pending or actively fetching) for active matches;
pending-pool matches are still fully cancelled and settled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:14:23 +02:00
Sheraff
6e7c02ace0
fix(vue-router): tolerate settled loadPromise on pending matches and restore _displayPending guard
Vue renders pending UI directly (it never suspends on the load promise),
so a settled/absent match-local promise is a legitimate stale-snapshot
state (hydration display matches, cancelMatches) — not an invariant
violation. Stamp pendingUntil only on a still-pending local promise,
mirroring React, and restore main's _displayPending early-return that
kept pending UI up after ClientOnly stops gating.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:12:51 +02:00
Sheraff
0bc62d07d1
fix(solid-router): render same-route pending UI from core publication, not the pending pool
The pendingReplacement branch swapped committed content for the pending
fallback (or null) the moment setPending published at load start,
bypassing pendingMs entirely and stamping pendingUntil at navigation
start. Core already owns pending timing: the render-ready lane is
published into the active store after pendingMs, which is what React
renders from. Solid now does the same.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:09:45 +02:00
Sheraff
8678c4d563
fix: settle superseded loads with the navigation chain and let preloads join pending-published owners
- loadClientRouter now awaits the superseding load chain before its public
  await settles, restoring the router.load()/invalidate() synchronization
  contract for superseded and redirected loads.
- joinPreloadedActiveMatch waits for the foreground load when the borrowed
  owner is a render-ready pending publication (active store, status
  'pending', pending pool cleared) instead of dropping descendant preloads.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:07:09 +02:00
Sheraff
f35f9c3e20
test: import edge-case reproductions from #7713
Covers: boundary component chunk isolation, chunk failure lifecycle,
superseded load await, server headers surviving head() failure, preload
during pending publication, background asset projection failure, Solid
same-route pending blanking, and SSR hydration of server-capped match
lists (e2e).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:04:43 +02:00
Manuel Schiller
e9acd3a456 fix: match loading
fixes #7602
fixes #7210
fixes #7457
fixes #7673
fixes #6221
2026-06-27 12:35:55 +02:00
248 changed files with 34913 additions and 5833 deletions

Some files were not shown because too many files have changed in this diff Show more