0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/packages/solid-router/src
Flo baa18cd913
fix(router): final-review regressions, changeset, and byte recovery (#7883)
* fix(router): final-review regressions, changeset, and byte recovery

Fixes the regressions vs main found in the final review of #7805:

- restore history-subscription cleanup on router provider unmount in all
  three adapters (react returns the unsubscribe unconditionally, solid
  uses onCleanup, vue uses onUnmounted), pinned by new
  transitioner-remount tests — a discarded router could previously keep
  loading on back/forward as a zombie
- same-destination navigations now join the in-flight transaction
  instead of aborting and restarting it (double-click no longer reruns
  loaders); reloads and same-location redirects keep restart semantics
- commitMatches cache retention can no longer resurrect a
  one-generation-old loaderData when a newer committed success exists
  for the same match id
- same-location dedup keeps __tempLocation/__tempKey so masked vs real
  same-href navigations commit their state again

Adds the missing release changeset enumerating the removed/changed
public API with migration hints.

Byte recovery: merges rendered-matches.ts, route-chunks.ts and
hydrate.ts into load-client.ts so the client bundle shares gzip
dictionary context across what were separate module boundaries
(-104..-186 gzip B per start scenario; plain router scenarios remain
net-negative vs main and hydration still tree-shakes out of them).

The solid/vue store-update-count pins were re-adjusted after verifying
the published update sequences are byte-identical: the counts only
shifted because a one-microtask timing change moves the tests'
waitFor-sampled window boundary (5 of 7 counts decreased).

* test(router-devtools-core): keep panel chunk warm-up out of the test budget

The cache-replacement test warmed Vite's lazy transform of
BaseTanStackRouterDevtoolsPanel inside the test body, so on slow CI
runners the transform alone could blow the 5s test timeout (observed at
5.89s). Move the warm-up to a beforeAll with its own generous timeout
and give the test itself explicit headroom. Pre-existing flake on the
lane branch tip, surfaced by this PR's CI being the first to run on it.

* refactor(router-core): extend lane typestate to matches and commits

The lane pipeline already carried phase brands at lane granularity
(Lane<'matched'|'contextualized'|'reduced'|'projected'>); this finishes
the pattern at the two granularities it was missing, at zero runtime
cost (all emitted dist JS verified byte-identical):

- settleInto becomes the sole granter of a SettledMatch brand via an
  assertion signature, and cacheLoaderMatch requires it — the
  loader -> settle -> cache ordering is now compiler-enforced. The one
  legitimate phase jump (hydration cache-seeding of already-settled
  dehydrated data) is a single named, commented boundary cast.
- commitMatches/commitRefreshMatches only accept a projected lane's
  matches (LaneMatches<'projected'>), so committing an earlier-phase
  lane no longer compiles.
- LoadTransaction's dev-only refresh triple collapses into one optional
  slot [presentation, handoff?], making a half-armed refresh state
  unrepresentable and shrinking the clear/read sites.
History 2026-07-23 15:35:11 +02:00
..
ssr fix(router-core): complete lane match loader rewrite (#7858) 2026-07-20 18:52:47 +02:00
Asset.tsx inline css (#7253) 2026-04-25 01:20:36 +02:00
awaited.tsx fix: streaming when using Await component (#7264) 2026-04-26 01:00:37 +02:00
CatchBoundary.tsx fix(router-core): harden lane loading lifecycle (#7869) 2026-07-22 00:43:31 +02:00
ClientOnly.tsx fix: lane match loader rewrite 2026-07-13 09:29:38 +02:00
fileRoute.ts refactor: remove unnecessary any assertions (#7542) 2026-06-04 22:12:45 +02:00
HeadContent.dev.tsx feat(start): support rsbuild iife client output (#7477) 2026-05-24 02:02:05 +02:00
HeadContent.tsx feat: transformAssets (#7009) 2026-03-22 20:25:12 +01:00
headContentUtils.tsx fix(router): address lane loader regressions (#7880) 2026-07-23 09:57:37 +02:00
history.ts feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
index.dev.tsx fix: cleanly separate dev styles from prod runtime (#6356) 2026-01-11 03:28:20 +01:00
index.tsx chore: cleanup unused exports (#6735) 2026-02-23 00:19:06 +01:00
lazyRouteComponent.tsx perf(router): reduce SSR lane loading overhead (#7875) 2026-07-22 08:56:43 +02:00
link.tsx fix(router-core): harden lane loading lifecycle (#7869) 2026-07-22 00:43:31 +02:00
Match.tsx perf(router): reduce SSR lane loading overhead (#7875) 2026-07-22 08:56:43 +02:00
matchContext.tsx fix(router-core): complete lane match loader rewrite (#7858) 2026-07-20 18:52:47 +02:00
Matches.tsx fix(router-core): harden lane loading lifecycle (#7869) 2026-07-22 00:43:31 +02:00
not-found.tsx refactor: switch router stores to atom get/set API (#7150) 2026-04-11 12:41:57 +02:00
renderRouteNotFound.tsx fix: strip invariant and warning strings from prod bundles (#7007) 2026-03-22 10:27:08 +01:00
route.tsx refactor: remove unnecessary any assertions (#7542) 2026-06-04 22:12:45 +02:00
router.ts refactor(router): remove global file route helpers (#7026) 2026-03-24 23:55:17 +01:00
routerContext.tsx fix: remove router context caching (#6734) 2026-02-22 23:48:33 +01:00
RouterProvider.tsx fix: remove router context caching (#6734) 2026-02-22 23:48:33 +01:00
routerStores.ts fix(router-core): complete lane match loader rewrite (#7858) 2026-07-20 18:52:47 +02:00
SafeFragment.tsx feat(solid-router): Add a SolidJS driver for TanStack Router (#3276) 2025-02-20 17:11:39 +01:00
ScriptOnce.tsx fix: re-export correctly (#6489) 2026-01-24 17:55:28 +01:00
Scripts.tsx fix(router): address lane loader regressions (#7880) 2026-07-23 09:57:37 +02:00
scroll-restoration.tsx fix: scroll restorating without throttling (#7042) 2026-03-26 18:00:55 +01:00
ScrollRestoration.tsx fix: scroll restorating without throttling (#7042) 2026-03-26 18:00:55 +01:00
Transitioner.tsx fix(router): final-review regressions, changeset, and byte recovery (#7883) 2026-07-23 15:35:11 +02:00
typePrimitives.ts fix(router-core): move typePrimitives to shared package (#3748) 2025-03-12 13:30:19 +01:00
useBlocker.tsx fix: unexported ShouldBlockFnLocation interface causes TS4023 (#7037) 2026-03-26 18:06:49 +01:00
useCanGoBack.ts refactor: switch router stores to atom get/set API (#7150) 2026-04-11 12:41:57 +02:00
useLoaderData.tsx refactor: remove unnecessary any assertions (#7542) 2026-06-04 22:12:45 +02:00
useLoaderDeps.tsx refactor: remove unnecessary any assertions (#7542) 2026-06-04 22:12:45 +02:00
useLocation.tsx refactor: switch router stores to atom get/set API (#7150) 2026-04-11 12:41:57 +02:00
useMatch.tsx fix(router-core): complete lane match loader rewrite (#7858) 2026-07-20 18:52:47 +02:00
useNavigate.tsx fix(react-router, solid-router): reduce useNavigate reactivity on path changes (#5037) 2025-08-31 13:48:25 +02:00
useParams.tsx refactor: remove unnecessary any assertions (#7542) 2026-06-04 22:12:45 +02:00
useRouteContext.ts refactor: remove unnecessary any assertions (#7542) 2026-06-04 22:12:45 +02:00
useRouter.tsx refactor: remove unnecessary any assertions (#7542) 2026-06-04 22:12:45 +02:00
useRouterState.tsx refactor: switch router stores to atom get/set API (#7150) 2026-04-11 12:41:57 +02:00
useSearch.tsx refactor: remove unnecessary any assertions (#7542) 2026-06-04 22:12:45 +02:00
utils.ts refactor: signal based reactivity (#6704) 2026-03-20 10:33:28 +01:00