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

822 commits

Author SHA1 Message Date
github-actions[bot]
9137df9b0e
ci: Version Packages (rc) (#8468)
ci: changeset release (rc)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-21 20:58:43 -05:00
Brenley Dueck
acd08ef685
chore(solid): bump to solid-js 2.0.0-rc.16 and @solidjs/vite-plugin 3.0.0-next.51 (#8751)
* chore(solid): bump to solid-js 2.0.0-rc.15 and @solidjs/vite-plugin 3.0.0-next.50

Bump solid-js and @solidjs/web to ^2.0.0-rc.15 and @solidjs/vite-plugin
to ^3.0.0-next.50 across the monorepo, along with the webpack example's
@solidjs/babel-plugin, the @rsbuild/plugin-solid compiler overrides and
the Solid packages' peer floors. Bump @tanstack/solid-query to
^6.0.0-rc.5 and move @tanstack/solid-query-devtools off its exact rc.1
pin to ^6.0.0-rc.5, whose solid-js imports all exist in rc.15.

In rc.15 a parent render effect runs before the Outlet's DOM swap within
the same commit, so the persistent-observer test now samples the DOM at
the end of the commit instead of mid-flush.

* fix(solid-router): render Await children with streamed data during hydration

On the client, Await calls defer() on a promise that seroval has already
resolved, but defer() only records the result in a .then callback, so the
synchronous hydration pass read status 'pending' and passed undefined to
the children. rc.13 hid this by reusing the server DOM; rc.15 evaluates the
children's expressions and the route errored. Read seroval's synchronous
s/v markers while the deferred state is still pending.

* chore(solid): bump to solid-js 2.0.0-rc.16 and @solidjs/vite-plugin 3.0.0-next.51

@solidjs/vite-plugin 3.0.0-next.51 no longer adds a $$moduleUrl export to
SSR entry chunks (solidjs/solid-vite-plugin#423), which workerd rejected
in the basic-cloudflare e2e. It peer-requires solid-js rc.16, so the
runtime, babel plugin, rsbuild compiler overrides and peer floors move to
rc.16 too.

rc.16's solid-js dev build reads DEV from @solidjs/signals at load time,
so the vitest alias of @solidjs/signals to solid-js now resolves to a
circular import and every suite failed with "reading 'guideUrl'". Drop
the alias from solid-router and the search-validator-adapters example.

The lockfile keeps the base branch's Babel resolutions; letting pnpm
re-resolve them gave router-plugin two @babel/types copies.

* chore: restore e2e test-results files removed by accident
2026-10-21 16:43:13 -05:00
Ryan Carniato
10152238ab
feat(solid-router): observe-tier attribution parity with @solidjs/router (solid-js rc.13) (#8574)
* fix(solid-router): name observe navigations by the route the pathname matches

The navigation declared to Solid's observe tier took its name and params
from the leaf expected match. A not-found's leaf is the route above it, so
every unmatched path was named after the root ('/') and folded into the
home page's feedback row; and the params were the values params.parse
returned, where NavigationRef declares the strings the path bound.

Name and params now come from matching the destination pathname
(router.getMatchedRoutes, the same rule matchRoutes uses for its 404
entry): the route's fullPath and its raw params, or the pathname itself
when no route matches it. The description moves to observe.ts so the
initial-route declaration can share it.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(solid-router): declare the route the document arrived on to Solid's observe tier

The Solid adapter declared every navigation's match publish to the observe
tier, but the first page has no publish to wrap, so the route the page
loaded as was never declared, and on the server the request's "render"
record had a URL and no route. solid-js / @solidjs/web 2.0.0-rc.12 added
NavigationRef.initial and RenderEvent.route for exactly this; Solid Router
adopted them in solidjs/solid-router#623.

RouterContextProvider now wraps the work that establishes its initial
match (the ready memo, which on the server starts the load) in the same
call, with initial: true on the ref:

- Client: the engine opens the frame at the time origin and settles it as
  the provider returns: the first "navigation" record, initial: true,
  writes: 0, at: 0, no from; kept out of feedback().navigations.
- Server: there is no engine; the server entry's withOrigin files the ref
  on the render, and the "render" record carries RenderEvent.route
  ({ name, to, params }), read at settle, after a provider-run load.

describeInitial shares describeRoute with describeNavigation; its fields
are getters over router.latestLocation.

The Transitioner's post-mount commit of the canonical arrival location
(search defaults, trailing slash) is the arrival's, not a navigation, the
TanStack form of #623's "an empty arrival normalized onto the base". With
the router loaded before mount, resolvedLocation was already set and that
commit was declared as a navigation from the arrival to itself; without
it, the arrival's history change left requestedAt set and the next real
navigation was dated from the mount. The commit is now marked, and every
non-pending publish answers the pending request, declared or not.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(solid-router): join observe navigations to the interaction that requested them

TanStack publishes a navigation's matches after router-core awaited the
loaders, in a later task than the click, so the interaction frame is gone
when the declared publish runs and the record carried no interaction
(TanStack/router#8399 listed it as a known gap; consumers joined by time).
solid-js 2.0.0-rc.12 added NavigationRef.interaction for this case: a
router that awaits between the request and the write captures
OBSERVE.attribution.currentOrigin() in the request and hands it back.

The Transitioner's history subscriber, which already dates the request,
now captures the origin with it (synchronously inside navigate(): the
history notifies in the same call when no blocker is awaited), and
describeNavigation passes it as interaction. The key is always set with
the request, so a navigation requested outside any interaction declares
none rather than picking up whatever is on the stack at publish.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(solid-router): give observe navigations the location's path, search and hash

`to` and `from` on a navigation's NavigationRef, the initial record's `to`,
and the server render's RenderEvent.route.to were the location's pathname,
so `/users/42?tab=posts#bio` and `/users/42` were one destination. Solid
Router gives the location as the router holds it: pathname + search + hash
on the client (browser history's `get()`, `memoryHistory`'s entry, and the
navigate target `url.pathname + url.search + url.hash`), pathname + search
on the server (`staticIntegration`: a request carries no hash).

TanStack's ParsedLocation.href is exactly that shape (pathname +
stringified search + `#hash`), in the router's own path space, the one
`name` (the route's fullPath) is in, before a basepath or rewrite is
applied (`publicHref`). Use it for all three.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(solid-router): name the canonical arrival in the initial observe record

The client's initial record was declared in RouterProvider and read
`router.latestLocation` as its frame closed, before the Transitioner
committed the canonical form of the arrival (search defaults, trailing
slash): `/about` arriving on a route whose search validates to
`/about?tab=info` was named `/about`, and the next navigation's `from`
was a location the record never named.

Solid Router declares the arrival around building its context, the
normalization of an empty arrival included, and reads `to` at settle, so
the record names the normalized location (its `observe-navigation` spec,
"an empty arrival normalized onto the base path is one initial record").
Declare the client's arrival around the Transitioner's establishing work
(canonicalization included) and name the location it established;
RouterProvider keeps the server's declaration around the load.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(solid-router): record a redirect while the first page loads as a navigation

A client-rendered arrival that redirects (a `beforeLoad` or loader
throwing `redirect()`) published its destination with no resolved
location to navigate from, so describeNavigation declared nothing and the
destination had no record: the initial record named the route the user
never saw, and nothing named the one they did.

Solid Router records it as a navigation of its own: the arrival's frame
has closed, so the redirect's location write is not a hop of a pending
navigation (`navigationDepth` is 0) and is declared from the arrival
(`from: "/files?x=1"`, no interaction, no `redirects`). Until the first
publish resolves a location, navigate from the arrival the initial record
names. A publish with no request behind it (the initial load itself) still
declares nothing.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(solid-router): declare a not-found whose unloaded match stays pending

The Transitioner tells the pending offer (`offerPending`, published while
the loaders run) from the publish that lands by a match with
`status: 'pending'`. A not-found under a route with a loader lands with
that route's match pending too: it sits below the not-found boundary and
never loads. So the landing publish was taken for the offer, published
undeclared, and the navigation had no record. Solid Router records an
unmatched path under a route with data like any other, named by its
pathname.

A publish is the offer only when a match at or above the not-found
boundary is pending. With a pending component, router-core offers the same
matches (pending below the boundary) before it lands; that offer already
shows the destination, the not-found rendering above the pending match,
so it is the publish declared and the landing that repeats it is not.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(solid-router): keep the requesting interaction across a useBlocker await

The Transitioner dated a navigation and captured its interaction when the
history notified. With a blocker registered, the history awaits the
blocker before it pushes, so the notification ran in a later task: the
interaction was gone from the stack and the record declared none, and a
navigation held until `proceed()` was dated from the confirm with no
interaction either. Solid Router has neither gap: its leave guard runs
synchronously inside navigate(), and a blocked navigation retried from the
confirm (`retry()`) navigates in the confirm's interaction.

Note the request (time, `currentOrigin()`) at `commitLocation`, before the
history is asked, for the history change it causes to take. A `useBlocker`
consulted synchronously as the first blocker holds it past the commit;
`proceed()` notes a new request in the interaction that proceeds, so the
navigation joins the confirm as Solid Router's `retry()` does; a blocker
that stops the navigation drops it; a commit that changed no history
releases it as it returns. Only on the client, only where `OBSERVE` is
defined.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(solid-router): record observe redirect hops the way Solid Router folds them

A navigation sent elsewhere while pending (a `beforeLoad` or loader
redirecting it, or a second navigation requested before the first
published) left one record naming only the final destination: no
`redirects`, nothing of where it had been headed.

Solid Router declares each location write, and a write while the previous
navigation is still pending (held, or not yet in history) is a hop of it,
`redirect: n` (`navigationDepth`): the engine folds it onto the pending
record, which keeps the user's request time and interaction, moves its
destination, and keeps the abandoned one in `redirects`. That includes a
second click while the first is pending, so the first click's interaction
winning is Solid Router's semantics too, not an adapter artifact. The
browser moving (popstate) is written with `_navigation: -1`, not a hop: a
navigation of its own that supersedes the pending one.

The Transitioner now tracks where a pending request is headed; a push or
replace before it publishes records a hop (the destination left, and when
it was sent on). The publish that lands is wrapped in the request's ref
with a nested `redirect: n` ref per hop, which is the shape Solid Router's
writes produce. A back/forward while pending starts a new request.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* test(solid-router): type the blocker resolver without a private import

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Brenley Dueck <brenleydueck@gmail.com>
2026-10-15 15:59:45 -05:00
Ryan Carniato
665e9d86a4
refactor(solid-router): move off sharedConfig onto Solid 2.0 public hydration APIs (solid-js rc.13) (#8569)
* chore(solid): bump to solid-js 2.0.0-rc.13 and @solidjs/vite-plugin 3.0.0-next.46

Bump solid-js and @solidjs/web to ^2.0.0-rc.13 across the monorepo,
@solidjs/vite-plugin to ^3.0.0-next.46 (its compiler range resolves to
rc.13, keeping the JSX compiler on the runtime's RC), the webpack
example's @solidjs/babel-plugin and the @rsbuild/plugin-solid compiler
overrides to 2.0.0-rc.13, and raise the Solid packages' solid-js /
@solidjs/web peer floors to 2.0.0-rc.13.

rc.13 replaced attribution.navigations() with
attribution.history('navigation'); observe-navigation.test.tsx follows.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor(solid-router): move hydration off sharedConfig onto public Solid 2.0 APIs

Replace solid-js internals with the public hydration surface shipped in
solid-js / @solidjs/web 2.0.0-rc.13 (solidjs/solid#3718):

- useHydrated: sharedConfig.hydrating -> isHydrating()
- serializeMatchTransfer: sharedConfig.context.serialize ->
  getHydrationWriter().write, gated on isHydratable() (the old
  context.noHydrate guard was dead in 2.0)
- primeRouterFromRegistry: raw _$HY.r reads, the tsr: prefix scan and
  s/v unwrapping -> per-match takeHydrationValue()
- tests / external-SSR repro: drop the sharedConfig reset and _$HY
  enumeration; the repro asserts entries server-side and consumption
  through takeHydrationValue

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* chore: restore Babel lockfile entries drifted by the rc.13 bump

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Brenley Dueck <brenleydueck@gmail.com>
2026-09-30 20:00:54 -05:00
Brenley Dueck
81ee38eee5
fix(solid-router): keep route-scoped accessors readable after navigation teardown (#7607)
Route-scoped accessors like Route.useParams() are backed by a lazy memo
in useMatch. When async work created by a route component read the
accessor after navigating away, the memo re-executed against the new
matches and threw "Invariant failed: Could not find an active match".

Track disposal of the owning reactive scope via onCleanup and return
the last known value for reads that happen after teardown, while still
throwing for mounted components that read a genuinely missing match.

Fixes #7331
Closes #7330

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-25 18:04:00 -05:00
Brenley Dueck
0dc3a9e3a5
chore(solid): bump to solid-js 2.0.0-rc.9 and @solidjs/vite-plugin 3.0.0-next.44 (#8467)
rc.9 renamed the id-based server-function URL helpers to
serverFunctionActionUrl / parseServerFunctionActionUrl (solidjs/solid#3440).
@rsbuild/plugin-solid 2.0.0-rc.0 pins the rc.6 compiler, whose delegated-event
key the rc.9 runtime no longer reads, so its compiler is overridden to rc.9.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 21:46:16 +02:00
github-actions[bot]
4fbd65c5c3
ci: Version Packages (rc) (#8360)
ci: changeset release (rc)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-17 20:29:31 +02:00
Ryan Carniato
bf7f924b60
feat(solid-router): consume server-function response metadata (#8461)
* feat(solid-router): consume server-function response metadata

RouterContextProvider registers the router as the unnamed single-flight
consumer of Solid's server-function transport on the client, so the
response helpers a mutation returns take effect without the caller
wrapping the call.

redirect(): the carrier delivers an absolute target, so the soft/hard
split is a real origin comparison — same-origin navigates under the
router with replace (the destination takes the submission's place in
history), any other origin goes through navigate({ href }) so the
document reload still passes the protocol allowlist and blockers.

Route data: any declaration of a write — redirect(), reload({
revalidate }), respond(value, { revalidate }), the reserved '*' —
reloads through router.invalidate(). An empty declaration
(revalidate: []) is honored as nothing to reload. Navigation runs
before invalidation so a redirect costs one load: invalidate's load
already reads the destination as the latest location, and the
adapter's follow-up load adopts those loader flights rather than
restarting them, so the destination commits with shared layouts
reloaded and the abandoned page never reruns its own loaders (the
other order does).

X-Revalidate keys name entries in caches the router does not own and
are left to those caches' consumers.

Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* test(solid-start): expect both flight sources on the single-flight request

The router now registers as the unnamed flight-data consumer, so the
transport advertises it on the request leg under the reserved id "true"
next to Start's "tsr". The response still folds only "tsr".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Brenley Dueck <brenleydueck@Brenleys-Mac-mini.local>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-17 12:16:20 -05:00
Fnine59
d46b8ee00b
fix(solid-router): preserve caller roles on enabled links (#8109) 2026-09-16 20:59:35 -05:00
Russell
465d15a15d
fix(solid-router): don't install intent-preload listeners when preloading is off (#8179)
* fix(solid-router): don't install intent-preload listeners when preloading is off

useLinkProps handed out onFocus/onBlur/onMouseEnter/onMouseLeave (plus the
mouseover/mouseout/touchstart trio) unconditionally, with the
`preload() !== 'intent'` check inside each handler. Solid does not delegate
mouseenter, mouseleave, focus or blur, so every anchor installed four real
listeners whose only job was to bail out — four per row on list views.

Resolve those props through getters instead: with intent preloading off the
property yields the consumer's own handler (or undefined, which
spread()/assign() treats as removal), so nothing is attached. The getters stay
reactive, so switching preload back to 'intent' re-runs the consuming spread
and attaches the composed handler.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* ci: apply automated fixes

---------

Co-authored-by: russelgal <intensivelider@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-16 20:48:25 -05:00
Ryan Carniato
9de3573f7f
feat(solid-router): declare navigations to Solid's observe tier (#8399)
On Solid's dev and observe builds the match publish inside startTransition
is wrapped in OBSERVE.attribution.withOrigin: the ref names the destination
route (fullPath, params, to/from pathnames) and dates from the history
change that started the load, so the record spans the loader wait even
though the publish comes after it. The pending offer, the initial load and
same-location reloads are published undeclared. Production is unchanged
(OBSERVE is undefined).

Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 16:33:30 -05:00
Brenley Dueck
8981eb7877
chore(solid): bump to solid-js 2.0.0-rc.8 and @solidjs/vite-plugin 3.0.0-next.43 (#8348)
* chore(solid): bump to solid-js 2.0.0-rc.7 and @solidjs/vite-plugin 3.0.0-next.42

Moves solid-js/@solidjs/web to ^2.0.0-rc.7, @solidjs/vite-plugin to
^3.0.0-next.42, @rsbuild/plugin-solid to ^2.0.0-rc.0 and the webpack
example's @solidjs/babel-plugin to ^2.0.0-rc.7 across the monorepo.

@tanstack/solid-start now normalizes Request subclasses (srvx's Node
adapter) into native Requests before Solid's server-function handler
sees them: rc.7 buffers every POST body via `new Request(request, {
body })`, which undici only accepts for its own instances, so every
POST answered 400 under srvx.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* chore(solid): bump to solid-js 2.0.0-rc.8 and @solidjs/vite-plugin 3.0.0-next.43

Moves solid-js/@solidjs/web to ^2.0.0-rc.8, @solidjs/vite-plugin to
^3.0.0-next.43 and the webpack example's @solidjs/babel-plugin to
^2.0.0-rc.8. rc.8 is ESM-only with engines.node >= 22.12.

rc.8 ships the upstream fix for the buffered server-function request
(a71e42e), so the srvx Request normalization from the rc.7 commit is
dropped again. @solidjs/vite-plugin next.43 honors the host's
resolve.noExternal patterns when externalizing the dependencies of
Solid consumers (solidjs/solid-vite-plugin#360), which is what broke
`vite dev` with "Package import specifier '#tanstack-router-entry' is
not defined" on next.41/42.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 19:53:22 +02:00
github-actions[bot]
a35eeb50eb
ci: Version Packages (rc) (#8290)
ci: changeset release (rc)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-08 03:48:09 +02:00
Brenley Dueck
a09b50cac1
fix(solid-router): respect server flag during development SSR (#8254) 2026-09-08 03:25:18 +02:00
github-actions[bot]
79e938f2b2
ci: Version Packages (rc) (#8239)
ci: changeset release (rc)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-04 19:24:12 +02:00
Ryan Carniato
cc25e82278
fix(solid-router): remove router-owned Loading boundaries, ack startTransition at settlement (#8236) 2026-09-04 18:54:53 +02:00
github-actions[bot]
8ca0beac8a
ci: Version Packages (rc) (#8219)
ci: changeset release (rc)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-03 22:08:49 +02:00
Ryan Carniato
b445b89281
feat(solid-router): native SSR match transfer, hydration-claiming boot, provider-owned dispatch (#8213)
* refactor(solid): retire solid-router-ssr-query — Solid's native channels carry the Router + Query pairing

solid-query v6's QueryClientProvider serializes the request's cache into
Solid's hydration registry during SSR and primes the client cache from
it, so running the ssr-query transport alongside it ships every query
payload twice. The package's two runtime conveniences are each a few
lines of userland composition on public APIs: the provider wrap via the
router's Wrap option, and cache-driven redirect() errors handed to
router.navigate from the caches' config.onError.

Converts the three Solid Start e2e apps to the composition (all suites
green, including the redirect-from-query tests) and marks the package
deprecated for the v2 line.

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

* chore: changeset for the solid-router-ssr-query deprecation notice

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

* feat(solid-start): named single-flight source for router flight data

Solid's single-flight channel is becoming multi-source (solidjs/solid
653dd41e): mutation responses carry a keyed envelope of per-cache
slices, each routed to the consumer subscribed under its source id.
Today Start claims the single unnamed slot on both halves, which means
any other cache wanting mutation-response data (e.g. solid-query, whose
provider subscribes under "sq" in TanStack/query#11326) displaces the
router's — whichever registers last wins, silently.

The router's flight data now rides its own source id ("tsr"): the
server collector registers additively with registerFlightDataSource and
the client subscribes its consumer under the same id, so router
loader/match state and other caches' slices coexist on one round trip.
A user-supplied collectFlightData hook keeps the unnamed slot to itself,
adding data alongside the router's instead of displacing it.

Both halves feature-detect the protocol on the installed @solidjs/web
(it ships in the release after 2.0.0-rc.4) and fall back to the exact
previous unnamed-slot behavior on older versions; since client and
server resolve the same install, the halves cannot disagree.

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

* feat(solid-router): loadFlightTarget, the cache-agnostic single-flight trigger

The router's half of flight collection as a public primitive: derive the
flight request for the mutation's target, run the matched routes' data
functions, hand the loaded router to the caller's collect() — any cache
(the router's own state, a query client) composes its extraction on top.
Start's collector now consumes it; errors are contained per Solid
Router's collector convention (flight data is an optimization, never a
mutation error).

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

* refactor(solid-start): require named flight sources, drop the pre-rc.5 fallback

@solidjs/web 2.0.0-rc.5 ships the multi-source single-flight protocol, so
the feature detection and cast shims bridging unreleased types come out:
the client subscribes directly under SOLID_START_FLIGHT_SOURCE, the server
registers its collector via registerFlightDataSource unconditionally (the
unnamed collectFlightData slot now always belongs to the user), and the
@solidjs/web peer floor moves to rc.5.

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

* test(e2e): expect the named single-flight source header

With the pre-rc.5 fallback stripped, the client advertises its named
source and the server echoes what it folded: X-Single-Flight is "tsr" on
both sides, not the legacy "true".

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

* chore(solid): bump solid-js, @solidjs/web, @solidjs/signals to 2.0.0-rc.6

Repo-wide (packages, examples, e2e apps, benchmarks) — a scoped bump
leaves the workspace mixed, and examples/benchmarks then build workspace
solid-start dists (which import registerFlightDataSource, rc.5+) against
their own @solidjs/web rc.4 resolution. rc.6 ships the named flight-data
source API this branch requires plus the settle-walk fix that unblocks
the Solid Query pairing. @tanstack/solid-start's peer floor moves to
rc.6.

The SSR bench helpers move onto rc.6's wire shape: scripted callers use
the data address (`<endpoint>/data/<id>`) — the bare address now answers
document traffic with the no-JS convention.

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

* spike(solid-router): Phase 1 — registry match transfer + hydration-claiming boot

Proves the RFC's Phase 1 claims on the external-SSR harness, against
published core (web 2.0.0-rc.5):

- Server render serializes each match's loaderData/status into Solid's
  hydration registry, content-addressed (`tsr:<matchId>`), the identical
  mechanism solid-query v6 ships queries through — no `__TSR_SSR__`
  script channel.
- The client boot matches synchronously, primes match state from the
  registry (populated at document parse), and commits — no
  `router.load()` before hydrate, loaders do not re-run (0 client runs),
  hydration claims the server DOM identically, and post-hydration
  navigation with an unresolved chunk still shows pending UI and settles
  under its boundary.

Spike-level notes: the commit must happen before hydrate() (store writes
inside the hydration render are owned-scope writes), the transfer covers
settled matches (promise-valued entries for pending loaders are the same
serialize call, next step), and the serialization-context guard keys on
`ctx.serialize` presence (`ctx.async` is not set under this web
version's renderToString).

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

* feat(solid-router): native SSR match transfer + hydration-claiming boot (Phase 1)

Grows the spike into the adapter. RouterProvider serializes each settled
match's state (loaderData, status, error, notFound, beforeLoadContext,
ssr) into Solid's hydration registry during server render —
content-addressed (`tsr:<matchId>`), the same channel solid-query v6
ships queries through, no `__TSR_SSR__` script injection. The Router
constructor owns the client half: when the registry holds entries for the
synchronously matched routes, it primes and commits match state at
creation — always outside a render, after the document (and therefore the
entries) parsed, before hydrate(). No load pass before hydration, no
loader re-runs; route chunks resolve at the read point under the
boundaries the server rendered.

Both halves are inert outside the bare pairing: the server skips when
`router.serverSsr` marks the Start contract, and the boot falls through
on the first missing entry (SPA pages, Start's own channel).

Placement is load-bearing: committing inside the hydration render — even
with writes moved off the owner — leaves the claiming walk's registry
bookkeeping desynced (nodes reuse correctly but audit as unclaimed).
Router creation is the client's natural pre-render moment, and the
harness A/B proved it clean.

Validated: external-SSR harness green end to end (registry primed, zero
client loader runs, identical DOM claimed, pending UI on post-hydration
nav), solid-router unit suite 865 tests green, and all 37 Solid Start e2e
tests green against the rc.6-candidate core (workspace tarballs) with the
named-source strips in place. The harness now contains zero transfer
code. Pending matches are skipped, not deferred — promise-valued entries
(streaming SSR) are the next increment.

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

* docs(rfc): record Phase 1 landed state — transfer + boot in the adapter, boundary bullet corrected

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

* feat(solid-router): provider-owned server dispatch + streamed loaderData

RouterProvider now owns router.load() on the server, parking the render
on it through an async memo — no more explicit await router.load() in
entries; blocking semantics ride Solid's async SSR. The bare-pairing
harness moves to renderToStream and proves deferred loaderData promises
stream natively (fallback in the shell chunk, value in a later chunk,
settled through hydration without <Await>).

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

* chore: changeset for Phase 1 native SSR transfer

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

* ci: apply automated fixes

* fix(solid): unbreak CI after the solid-js rc.6 bump

Two things were failing the Test job:

- @tanstack/solid-router test:eslint: the repro-external-ssr harness
  is not part of the package tsconfig, so the typed parser rejected
  its .tsx files. Ignore the harness in the package eslint config; it
  is a standalone vite script, not shipped code.

- Four example builds (basic-solid-query, basic-solid-query-file-based,
  kitchen-sink-file-based, kitchen-sink-solid-query) run tsc, and the
  rc.6 types no longer accept the one-argument createEffect form.
  Convert the eleven call sites to the two-argument
  createEffect(source, effect) form already used by the sibling
  examples and e2e apps.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Brenley Dueck <brenleydueck@gmail.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-02 18:50:29 -05:00
Ryan Carniato
96f50d94a6
feat(solid): named single-flight source + loadFlightTarget, the cache-agnostic trigger (#8192)
* refactor(solid): retire solid-router-ssr-query — Solid's native channels carry the Router + Query pairing

solid-query v6's QueryClientProvider serializes the request's cache into
Solid's hydration registry during SSR and primes the client cache from
it, so running the ssr-query transport alongside it ships every query
payload twice. The package's two runtime conveniences are each a few
lines of userland composition on public APIs: the provider wrap via the
router's Wrap option, and cache-driven redirect() errors handed to
router.navigate from the caches' config.onError.

Converts the three Solid Start e2e apps to the composition (all suites
green, including the redirect-from-query tests) and marks the package
deprecated for the v2 line.

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

* chore: changeset for the solid-router-ssr-query deprecation notice

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

* feat(solid-start): named single-flight source for router flight data

Solid's single-flight channel is becoming multi-source (solidjs/solid
653dd41e): mutation responses carry a keyed envelope of per-cache
slices, each routed to the consumer subscribed under its source id.
Today Start claims the single unnamed slot on both halves, which means
any other cache wanting mutation-response data (e.g. solid-query, whose
provider subscribes under "sq" in TanStack/query#11326) displaces the
router's — whichever registers last wins, silently.

The router's flight data now rides its own source id ("tsr"): the
server collector registers additively with registerFlightDataSource and
the client subscribes its consumer under the same id, so router
loader/match state and other caches' slices coexist on one round trip.
A user-supplied collectFlightData hook keeps the unnamed slot to itself,
adding data alongside the router's instead of displacing it.

Both halves feature-detect the protocol on the installed @solidjs/web
(it ships in the release after 2.0.0-rc.4) and fall back to the exact
previous unnamed-slot behavior on older versions; since client and
server resolve the same install, the halves cannot disagree.

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

* feat(solid-router): loadFlightTarget, the cache-agnostic single-flight trigger

The router's half of flight collection as a public primitive: derive the
flight request for the mutation's target, run the matched routes' data
functions, hand the loaded router to the caller's collect() — any cache
(the router's own state, a query client) composes its extraction on top.
Start's collector now consumes it; errors are contained per Solid
Router's collector convention (flight data is an optimization, never a
mutation error).

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

* refactor(solid-start): require named flight sources, drop the pre-rc.5 fallback

@solidjs/web 2.0.0-rc.5 ships the multi-source single-flight protocol, so
the feature detection and cast shims bridging unreleased types come out:
the client subscribes directly under SOLID_START_FLIGHT_SOURCE, the server
registers its collector via registerFlightDataSource unconditionally (the
unnamed collectFlightData slot now always belongs to the user), and the
@solidjs/web peer floor moves to rc.5.

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

* test(e2e): expect the named single-flight source header

With the pre-rc.5 fallback stripped, the client advertises its named
source and the server echoes what it folded: X-Single-Flight is "tsr" on
both sides, not the legacy "true".

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

* chore(solid): bump solid-js, @solidjs/web, @solidjs/signals to 2.0.0-rc.6

Repo-wide (packages, examples, e2e apps, benchmarks) — a scoped bump
leaves the workspace mixed, and examples/benchmarks then build workspace
solid-start dists (which import registerFlightDataSource, rc.5+) against
their own @solidjs/web rc.4 resolution. rc.6 ships the named flight-data
source API this branch requires plus the settle-walk fix that unblocks
the Solid Query pairing. @tanstack/solid-start's peer floor moves to
rc.6.

The SSR bench helpers move onto rc.6's wire shape: scripted callers use
the data address (`<endpoint>/data/<id>`) — the bare address now answers
document traffic with the no-JS convention.

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

* ci: apply automated fixes

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-09-02 18:10:56 -05:00
github-actions[bot]
5010e89a0c
ci: Version Packages (rc) (#8190)
ci: changeset release (rc)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-28 19:32:16 -05:00
Brenley Dueck
22fd367d81
chore(solid): bump to solid-js 2.0.0-rc.4 and @solidjs/vite-plugin 3.0.0-next.35 (#8189)
* chore(solid): bump to solid-js 2.0.0-rc.4 and @solidjs/vite-plugin 3.0.0-next.35

Also:
- Migrate the webpack example and docs off the deleted babel-preset-solid
  onto @solidjs/babel-plugin (compiler packages were renamed in rc.3).
- Bump @rsbuild/plugin-solid to ^2.0.0-beta.2 so the rsbuild path compiles
  with the rc-line preset.
- Adapt the server function transport to rc.4: function ids resolve from
  the request url pathname (X-Server-Function header removed), and the
  client reference derives its url from the configured endpoint.
- Wire per-call AbortSignals through Solid's new invoke() channel and
  re-enable the previously skipped abort e2e tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(solid-start): rc.4 CI fallout — rsbuild native loader ssr mode, benchmark wire protocol

- @rsbuild/plugin-solid >= 2.0.0-beta.1 compiles through its own solid
  loader (native compiler) instead of registering babel-preset-solid, so
  the babel preset patch never fired and node-target rsbuild bundles were
  compiled in dom mode, throwing "Client-only API called on the server
  side" at import. Patch the loader's solid options (generate ssr on
  node targets, hydratable) alongside the legacy preset patch.
- The benchmark server-function request builders still spoke the pre-rc.4
  wire protocol (id in the removed X-Server-Function-Id header, bare
  endpoint url). Ids now ride the url pathname.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(solid): bump @tanstack/solid-query to 6.0.0-rc.1

The rc.1 adapter is rewritten onto Solid 2.0's native async model
(TanStack/query#11308) and peer-requires solid-js >=2.0.0-rc.4, so it
rides this branch's rc.4 bump. Catalog entry plus the non-catalogued
solid-query-devtools pins move in lockstep.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 19:05:50 -05:00
github-actions[bot]
5f657835cf
ci: Version Packages (rc) (#8173)
ci: changeset release (rc)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-26 18:12:28 +02:00
github-actions[bot]
f3fa7c55a0
ci: Version Packages (rc) (#8167)
ci: changeset release (rc)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-25 13:06:37 -05:00
Brenley Dueck
eaa2e8d5ce
chore(solid): bump to solid-js 2.0.0-rc.2 and @solidjs/vite-plugin 3.0.0-next.32 (#8166)
Monorepo-wide range bump: solid-js, @solidjs/web, and babel-preset-solid
^2.0.0-rc.1 -> ^2.0.0-rc.2, @solidjs/vite-plugin ^3.0.0-next.30 ->
^3.0.0-next.32. No code changes needed; the new vite-plugin still peers
on solid-js ^2.0.0-rc.0.

Verified: solid packages build; unit suites green; solid-start basic
e2e 80 passed, start-manifest 12 passed.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 14:51:49 +02:00
github-actions[bot]
b6984af74d
ci: Version Packages (rc) (#8124)
ci: changeset release (rc)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-19 23:59:30 +02:00
Brenley Dueck
252caa8534
feat(solid-router): delegate lazyRouteComponent to Solid 2's lazy() (#8081)
* feat(solid-router): register head tags through Solid's useHead registry

HeadContent now feeds the route-derived tags (useTags output, semantics
unchanged) to Solid's head registry as one reactive group instead of
rendering <Asset> elements in-tree. The registry owns head emission on
both runtimes: SSR splices/streams resolved winners into <head>, the
client patches document.head reactively — replacing the manual
relocate-into-head, imperative script injection, and document.title
syncing that Asset.tsx carried for head tags.

The dev-only dev-styles handling (filter DEV_STYLES_ATTR links post
hydration) is a no-op in production, so it folds into the single
HeadContent — retiring HeadContent.dev.tsx, index.dev.tsx, and the
package's development export conditions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(solid-start): pin SSR'd lazy() modulepreload hints and hydration asset map

The client-assets manifest wiring (99756c0710) gives SSR'd lazy()
components three observable outputs in the served HTML: modulepreload
hints for the lazy chunk and its static imports in the initial <head>,
the chunk's stylesheet link, and the serialized boundary→chunk asset map
that gates client hydration on those imports. The start-manifest e2e
only asserted the stylesheet side, so a silent regression to the
route-keyed manifest fallback would keep the suite green while losing
hints and hydration gating.

Two request-level tests against the built app pin the rest: direct SSR
entry to /lazy-css-lazy emits exactly one head modulepreload for the
lazy chunk and one for its statically imported widget chunk (and none of
them on routes that never render the component), and the hydration
payload's _assets map points at the same chunk URL the head hinted.

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

* refactor(solid-router): lean on the head registry for tag lifecycle

Drop the pieces of the head pipeline that existed only for the old
in-tree render path: the reference-reuse memo and replaceEqualTags (DOM
node stability for a <For> that no longer exists) and the dev-styles
post-hydration filtering (HeadContent is now a pure useHead
registration). Add the changeset for the useHead adoption.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci: apply automated fixes

* feat(solid-router): delegate lazyRouteComponent to Solid's lazy()

Route components now render through solid-js lazy(): the importer wrapper
selects the configured export and forwards the module's $$moduleUrl (the
bundler's SSR transform appends it), so SSR'd route chunks get client
asset resolution — stylesheet links, modulepreload hints, and hydration
gating — through the same client-assets manifest seam as any other
lazy() component, with positional hydration as the fallback.

Carries an interim pnpm patch for solid-js 2.0.0-rc.0 (to be upstreamed,
same play as the vite-plugin-solid isEntry patch): lazy() no longer
caches a rejected module promise, so a failed chunk download is retried
by the next preload or render instead of being sealed in for the page's
lifetime — this is what lets TanStack's download-retry contract ride on
lazy() directly instead of wrapping it in a retry state machine. The
patch also fixes an unhandled-rejection leak (lazy's internal .then had
no rejection handler) and, on the server, stops a transient import
failure from poisoning every later SSR request.

Retry semantics improve: a failed hover-preload is retried at render
(previously the recorded error was thrown without re-attempting the
import); the error boundary + route-reload retry flow is unchanged when
the render-time attempt also fails. preload() keeps its contract — a
memoized Promise<void> that never rejects, cleared on failure so a later
preload retries, one import per server. The module-not-found reload-once
dance is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(solid-router): stable head-registry identities for inline tags + CI repairs

Inline scripts and styles get a stable content-derived key in toHeadTags:
the registry otherwise assigns per-runtime unique identities that can
never match between server and client, so hydration appended a client
copy next to the server-rendered tag (caught by the solid-start basic
script-duplication e2e).

The ssr head benchmark's sanity assertion now counts name="…" attribute
occurrences instead of raw substring hits — the registry writes the
identity into data-dh on the same element, which doubled the old count.

remountDeps tests migrate onMount to Solid 2's onSettled (pre-existing
branch failure; the API was removed in the rc line).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(solid-router): make route-boundary resets converge (issue 7986 + background recovery)

Two compounding defects kept a captured route error from retrying
cleanly on Solid 2:

- CatchBoundary's reset effect re-ran on every recompute of the reset
  key, not only on value changes, so any store write recreated the
  retried subtree while it settled. The effect is now gated on the key
  value. The reset handle deliberately stays un-consumed: a reset
  applied at the wrong moment can no-op (the boundary stays errored and
  the fallback never re-runs), and only a repeated attempt on a later
  key change recovers it — consuming the handle at apply time or at
  children re-render both proved to lose exactly that retry (verified
  against the background-recovery test).

- Match keyed its boundary on the whole matches store, so every
  unrelated transition fired a premature reset that re-threw the
  still-stale error and flapped the error UI. The key is now scoped to
  the guarded match and its descendants (whose errors bubble here when
  they have no errorComponent), mirroring react-router's per-match
  keying, as a value string because the store emits fresh objects for
  content-equal writes.

The issue-7986 pending assertion queries fresh under waitFor: the
retried subtree renders the pending fallback from two nested slots in
quick succession (Show fallback, then the Loading boundary once the
child suspends), so a cached element handle can go stale across the
swap.

First fully green unit run on this branch: 59 files, 864 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(solid-router): hydrate lazy route components correctly; scope route assets to TanStack's manifest

Extends the interim solid-js patch with two hydration-critical fixes
(both upstream candidates, same play as the retry fix it already
carries):

- lazy()'s preloaded-module hydration shortcut (_$HY.modules) now only
  applies when the callsite has a bundler-injected moduleUrl. The
  shortcut assumes the registered chunk's default export is the
  component; for wrappers selecting a named export it silently rendered
  undefined, never claimed the SSR'd DOM, and navigation later couldn't
  dispose it — 20 basic-suite e2e failures (orphaned route content
  stacking up across navigations).

- $$moduleUrl: null on a lazy()-resolved module is an explicit opt-out
  of per-module asset registration, without the server warning that
  undefined draws.

lazyRouteComponent uses that opt-out: route chunks bundle many routes,
so registering the chunk emitted the union of their CSS on every route
and broke per-route stylesheet isolation (4 start-manifest e2e
failures). Route assets stay on TanStack's route-keyed manifest, which
is per-route precise; hydration is synchronous because preload() warms
lazy()'s component cache before the router renders. User-level lazy()
components inside routes remain fully registered — the opt-out is
scoped to the route-component wrapper.

Verified: solid-start basic e2e 80 passed (was 60/20); start-manifest
10 passed (including the previously failing lazy-to-static shared-CSS
navigation); unit suites green apart from the four pre-existing
failures fixed on the useHead branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(solid-router): route chunks opt in to Solid's client-assets manifest

With the head registry (useHead branch) underneath, lazyRouteComponent
forwards the module's real $$moduleUrl: split route modules have
per-module client-manifest entries (the query is part of the module
identity), so server-side lazy() registers exactly the route's own CSS
and modulepreload hints, and the registry's URL-keyed resource dedupe
absorbs the overlap with TanStack's route-keyed manifest links — the
duplicate-stylesheet failures that forced the earlier $$moduleUrl null
opt-out were double emission between Solid's channel and TanStack's
in-tree links, which the registry now reconciles.

The now-unused null opt-out hunk is dropped from the solid-js patch,
leaving exactly the two upstream-tracked fixes (rejection retry:
solidjs/solid#2999, fixed on next in 3c68ab21; hydration-shortcut
moduleUrl gate: solidjs/solid#3011).

Verified on the stack: unit 59 files / 865 tests all green (first fully
green combination), solid-start basic e2e 80 passed, start-manifest 12
passed including the ported modulepreload-hint and hydration asset-map
tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(solid-router): adopt lazy()'s { export } option via upstream backport

Upstream resolved solidjs/solid#3011 with first-class named-export
support instead of the fallback gate this patch carried: lazy(fn,
{ export }, moduleUrl?) names which export of the resolved module is
the component, as a call-site literal available on both runtimes —
so hydration claims the component synchronously from the preloaded
module namespace, and runtime wrappers that pick an export inside the
import thunk fail loudly in dev instead of silently orphaning SSR'd
DOM.

The solid-js patch is now a faithful backport of solidjs/solid@56ca6470
(which also carries the #2999 rejection-retry fix in its final
load-inside-memo shape) onto the rc.0 dists, plus one deliberate
deviation: lazy() still accepts the legacy string second argument
(moduleUrl) that rc.0's bundler transform injects, normalizing it to
the third position, until the updated transform (dom-expressions
0856717a) ships. Type declarations carry the new overloads.

lazyRouteComponent takes its final upstream-aligned shape: the module
namespace passes through untouched ($$moduleUrl included, so route
chunks keep registering their real client assets), { export } selects
the component, and only the module-not-found reload dance and the
memoized never-rejecting preload contract remain as wrapper logic.
When an rc ships with both upstream commits, the migration is deleting
the patch.

Verified: unit 59 files / 865 tests green; solid-start basic e2e 80
passed; start-manifest 12 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(solid): bump to solid-js 2.0.0-rc.1 and drop the solid-js patch

rc.1 ships everything the interim patch carried: the lazy() rejection
retry fix (solidjs/solid#2999, 3c68ab21) and the { export } option with
its loud-in-dev hydration guard (solidjs/solid#3011, 56ca6470 +
dom-expressions 0856717a — the updated transform arrives through
babel-preset-solid 2.0.0-rc.1 via @solidjs/vite-plugin 3.0.0-next.30).
patches/ and the patchedDependencies entry are deleted;
lazyRouteComponent is unchanged, already in its final shape against the
real API.

Monorepo-wide range bump: solid-js and @solidjs/web ^2.0.0-rc.0 →
^2.0.0-rc.1, @solidjs/vite-plugin ^3.0.0-next.28 → ^3.0.0-next.30.

Verified on vanilla rc.1: unit 59 files / 865 tests green; solid-start
basic e2e 80 passed; start-manifest 12 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Ryan Carniato <ryansolid@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-19 19:09:35 +02:00
Brenley Dueck
b60b741a88
feat(solid-router): adopt Solid 2's useHead registry for head management (#8080)
* feat(solid-router): register head tags through Solid's useHead registry

HeadContent now feeds the route-derived tags (useTags output, semantics
unchanged) to Solid's head registry as one reactive group instead of
rendering <Asset> elements in-tree. The registry owns head emission on
both runtimes: SSR splices/streams resolved winners into <head>, the
client patches document.head reactively — replacing the manual
relocate-into-head, imperative script injection, and document.title
syncing that Asset.tsx carried for head tags.

The dev-only dev-styles handling (filter DEV_STYLES_ATTR links post
hydration) is a no-op in production, so it folds into the single
HeadContent — retiring HeadContent.dev.tsx, index.dev.tsx, and the
package's development export conditions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(solid-start): pin SSR'd lazy() modulepreload hints and hydration asset map

The client-assets manifest wiring (99756c0710) gives SSR'd lazy()
components three observable outputs in the served HTML: modulepreload
hints for the lazy chunk and its static imports in the initial <head>,
the chunk's stylesheet link, and the serialized boundary→chunk asset map
that gates client hydration on those imports. The start-manifest e2e
only asserted the stylesheet side, so a silent regression to the
route-keyed manifest fallback would keep the suite green while losing
hints and hydration gating.

Two request-level tests against the built app pin the rest: direct SSR
entry to /lazy-css-lazy emits exactly one head modulepreload for the
lazy chunk and one for its statically imported widget chunk (and none of
them on routes that never render the component), and the hydration
payload's _assets map points at the same chunk URL the head hinted.

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

* refactor(solid-router): lean on the head registry for tag lifecycle

Drop the pieces of the head pipeline that existed only for the old
in-tree render path: the reference-reuse memo and replaceEqualTags (DOM
node stability for a <For> that no longer exists) and the dev-styles
post-hydration filtering (HeadContent is now a pure useHead
registration). Add the changeset for the useHead adoption.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci: apply automated fixes

* fix(solid-router): stable head-registry identities for inline tags + CI repairs

Inline scripts and styles get a stable content-derived key in toHeadTags:
the registry otherwise assigns per-runtime unique identities that can
never match between server and client, so hydration appended a client
copy next to the server-rendered tag (caught by the solid-start basic
script-duplication e2e).

The ssr head benchmark's sanity assertion now counts name="…" attribute
occurrences instead of raw substring hits — the registry writes the
identity into data-dh on the same element, which doubled the old count.

remountDeps tests migrate onMount to Solid 2's onSettled (pre-existing
branch failure; the API was removed in the rc line).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(solid-router): make route-boundary resets converge (issue 7986 + background recovery)

Two compounding defects kept a captured route error from retrying
cleanly on Solid 2:

- CatchBoundary's reset effect re-ran on every recompute of the reset
  key, not only on value changes, so any store write recreated the
  retried subtree while it settled. The effect is now gated on the key
  value. The reset handle deliberately stays un-consumed: a reset
  applied at the wrong moment can no-op (the boundary stays errored and
  the fallback never re-runs), and only a repeated attempt on a later
  key change recovers it — consuming the handle at apply time or at
  children re-render both proved to lose exactly that retry (verified
  against the background-recovery test).

- Match keyed its boundary on the whole matches store, so every
  unrelated transition fired a premature reset that re-threw the
  still-stale error and flapped the error UI. The key is now scoped to
  the guarded match and its descendants (whose errors bubble here when
  they have no errorComponent), mirroring react-router's per-match
  keying, as a value string because the store emits fresh objects for
  content-equal writes.

The issue-7986 pending assertion queries fresh under waitFor: the
retried subtree renders the pending fallback from two nested slots in
quick succession (Show fallback, then the Loading boundary once the
child suspends), so a cached element handle can go stale across the
swap.

First fully green unit run on this branch: 59 files, 864 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Ryan Carniato <ryansolid@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-19 17:58:15 +02:00
autofix-ci[bot]
6512ced192
ci: apply automated fixes 2026-08-13 04:12:26 +00:00
Brenley Dueck
1022de9f32 Merge branch 'main' into upgrade-solidjs-rc-0-main-merge
# Conflicts:
#	benchmarks/client-nav/package.json
#	benchmarks/client-nav/scenarios/async-pipeline/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/control-flow/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/head/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/history/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/links/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/loaders/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/mount/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/nested-params/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/preload/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/rewrites/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/route-tree-scale/solid/src/main.tsx
#	benchmarks/client-nav/scenarios/search-params/solid/src/main.tsx
#	examples/react/basic-default-search-params/package.json
#	examples/react/large-file-based/package.json
#	examples/react/location-masking/package.json
#	examples/react/navigation-blocking/package.json
#	examples/react/router-monorepo-react-query/packages/router/package.json
#	examples/react/search-validator-adapters/package.json
#	examples/react/start-large/package.json
#	examples/solid/authenticated-routes-firebase/package.json
#	examples/solid/authenticated-routes/package.json
#	examples/solid/basic-default-search-params/package.json
#	examples/solid/basic-devtools-panel/package.json
#	examples/solid/basic-file-based/package.json
#	examples/solid/basic-non-nested-devtools/package.json
#	examples/solid/basic-solid-query-file-based/package.json
#	examples/solid/basic-solid-query/package.json
#	examples/solid/basic-ssr-file-based/package.json
#	examples/solid/basic-ssr-streaming-file-based/package.json
#	examples/solid/basic-virtual-file-based/package.json
#	examples/solid/basic-virtual-inside-file-based/package.json
#	examples/solid/basic/package.json
#	examples/solid/deferred-data/package.json
#	examples/solid/i18n-paraglide/package.json
#	examples/solid/kitchen-sink-file-based/package.json
#	examples/solid/kitchen-sink-solid-query-file-based/package.json
#	examples/solid/kitchen-sink-solid-query/package.json
#	examples/solid/kitchen-sink/package.json
#	examples/solid/large-file-based/package.json
#	examples/solid/location-masking/package.json
#	examples/solid/navigation-blocking/package.json
#	examples/solid/quickstart-esbuild-file-based/package.json
#	examples/solid/quickstart-file-based/package.json
#	examples/solid/quickstart-rspack-file-based/package.json
#	examples/solid/quickstart-webpack-file-based/package.json
#	examples/solid/quickstart/package.json
#	examples/solid/router-monorepo-simple-lazy/package.json
#	examples/solid/router-monorepo-simple-lazy/packages/router/package.json
#	examples/solid/router-monorepo-simple/package.json
#	examples/solid/router-monorepo-simple/packages/router/package.json
#	examples/solid/router-monorepo-solid-query/package.json
#	examples/solid/router-monorepo-solid-query/packages/router/package.json
#	examples/solid/scroll-restoration/package.json
#	examples/solid/search-validator-adapters/package.json
#	examples/solid/start-basic-auth/package.json
#	examples/solid/start-basic-authjs/package.json
#	examples/solid/start-basic-cloudflare/package.json
#	examples/solid/start-basic-netlify/package.json
#	examples/solid/start-basic-nitro/package.json
#	examples/solid/start-basic-solid-query/package.json
#	examples/solid/start-basic-static/package.json
#	examples/solid/start-basic/package.json
#	examples/solid/start-bun/package.json
#	examples/solid/start-convex-better-auth/package.json
#	examples/solid/start-counter/package.json
#	examples/solid/start-i18n-paraglide/package.json
#	examples/solid/start-large/package.json
#	examples/solid/start-streaming-data-from-server-functions/package.json
#	examples/solid/start-supabase-basic/package.json
#	examples/solid/start-tailwind-v4/package.json
#	examples/solid/view-transitions/package.json
#	examples/solid/with-framer-motion/package.json
#	examples/solid/with-trpc/package.json
#	packages/solid-router/CHANGELOG.md
#	packages/solid-router/package.json
#	packages/solid-router/src/CatchBoundary.tsx
#	packages/solid-router/src/Match.tsx
#	packages/solid-router/src/link.tsx
#	packages/solid-router/src/useBlocker.tsx
#	packages/solid-router/src/useRouterState.tsx
#	packages/solid-router/src/utils.ts
#	packages/solid-start-client/CHANGELOG.md
#	packages/solid-start-client/package.json
#	packages/solid-start-client/src/GenericHydrate.tsx
#	packages/solid-start-server/CHANGELOG.md
#	packages/solid-start-server/package.json
#	packages/solid-start/CHANGELOG.md
#	packages/solid-start/package.json
#	pnpm-lock.yaml
2026-08-12 23:09:21 -05:00
Brenley Dueck
9b773206ed Version Packages: solid family to 2.0.0-rc.0
Manually applied `changeset version` and normalized the prerelease counters
to 0. Changesets continues each package's counter across a pre-tag switch
(beta.30 would have become rc.31), and the counter is derived from the
current versions, so a literal rc.0 is only reachable by hand.

All six @tanstack/solid-* packages move to 2.0.0-rc.0; the pending solid
changesets are recorded as consumed in .changeset/pre.json, so CI's next
version run has nothing further to apply.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 20:32:52 -05:00
Brenley Dueck
56cc90ea2c Upgrade solidjs rc 0 and rename vite-plugin-solid to @solidjs/vite-plugin
`vite-plugin-solid` has been renamed to `@solidjs/vite-plugin`. Its final
release under the old name (`3.0.0-next.27`) is a re-export shim over the new
package, and `next.28`+ ships only under the new name.

The rename and the `rc` bump are forced together: `@solidjs/vite-plugin@3.0.0-next.28`
peer-requires `solid-js`/`@solidjs/web` `^2.0.0-rc.0`.

- solid-js, @solidjs/web, babel-preset-solid: 2.0.0-beta.32 -> ^2.0.0-rc.0
- vite-plugin-solid ^3.0.0-next.23 -> @solidjs/vite-plugin ^3.0.0-next.28
- @tanstack/solid-query + solid-query-devtools -> ^6.0.0-rc.0
  (solid-query rc.0 peer-requires solid-js >=2.0.0-rc.0)
- @tanstack/query-core converged on 5.101.4: solid-query depends on query-core
  5.101.0, which previously resolved to a stale 5.99.0 and produced two
  structurally incompatible `QueryClient` types, failing
  @tanstack/solid-router-ssr-query's build

`packages/router-devtools-core` intentionally stays on `vite-plugin-solid@^2.11.10`
— it builds against Solid 1.9.12 and `@solidjs/vite-plugin` has no 2.x line.

`@tanstack/router-plugin` is intentionally untouched: it detects the Solid JSX
plugin by its Vite plugin name (`solid`), which the renamed package still
registers, and its `vite-plugin-solid` peer is optional — so it keeps working
for both Solid 1 and Solid 2 consumers without a change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 20:21:16 -05:00
Flo
38485038c5
Fix default route component remounting (#8002)
* Fix default route component remounting

* Optimize reactive Vue Link props

* fix(vue-router): address reactive Link review feedback
2026-08-12 14:53:17 +02:00
github-actions[bot]
e15bda5c4d
ci: Version Packages (#8040)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-12 10:33:33 +02:00
Flo
f5007607d6
fix(router): warn when Outlet is rendered in fallback components (#8045) 2026-08-12 09:53:15 +02:00
Flo
aa10b6589e
fix(router): apply preload delay to viewport links (#8044)
* fix(router): apply preload delay to viewport links

* fix(router): cancel delayed viewport preloads on exit

* fix(router): process queued viewport transitions in order

* fix(router): use latest queued viewport state

* refactor(router): inline viewport observer options

* fix(router): stabilize viewport preload timers

* cleaner timeout map key
2026-08-12 09:52:36 +02:00
Flo
1aafca9b45
refactor: remove Link transition state (#8043) 2026-08-12 09:52:10 +02:00
github-actions[bot]
03fd7365a7
ci: Version Packages (beta) (#8034)
ci: changeset release (beta)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-10 15:24:58 -05:00
Brenley Dueck
980ed5794a
Upgrade solidjs beta 32 (#8014)
* Upgrade solid-js to 2.0.0-beta.32 and vite-plugin-solid to 3.0.0-next.23

- solid-js / @solidjs/web / babel-preset-solid: 2.0.0-beta.29 -> 2.0.0-beta.32
- vite-plugin-solid: ^3.0.0-next.21 -> ^3.0.0-next.23 (ships @dom-expressions/compiler 0.50.0-next.40)
- Migrate server tests off removed renderToStringAsync: awaiting renderToStream()
  now resolves with the fully-settled HTML string

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci: apply automated fixes

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-10 15:05:00 -05:00
Ryan Carniato
41cffa00f3
fix(solid-router): make the global loading boundary opt-in and server/client-symmetric (#8027)
* fix(solid-router): make the global loading boundary opt-in and server/client-symmetric

`Matches` wrapped the match tree in a client-only `Solid.Loading`
boundary unless `disableGlobalCatchBoundary`, `isServer`, or
`router.ssr` was set, while the server side always rendered
`SafeFragment`. Apps that server-render without the `$_TSR` stream
protocol (own server entry: memory history, awaited `router.load()`,
`renderToStream`) never set `router.ssr`, so the client hydrated a
boundary the server never rendered. That desyncs Solid's positional
node claiming and surfaces as an opaque `reconcileArrays` crash
(`NotFoundError: insertBefore`).

The wrapper is now opt-in and the decision is evaluated identically on
the server and the client. It renders only when all of these hold:

- the app configured root pending UI (root `pendingComponent` or
  `defaultPendingComponent`) — new;
- `router.ssr` is not set (the `$_TSR` protocol short-circuit,
  unchanged and pinned by tests);
- `disableGlobalCatchBoundary` is not set (unchanged).

There is no `isServer` arm, no hydration probe, and no match-state
inspection — the decision reads only router configuration, so the
server tree and the hydrating client tree cannot disagree.

With nothing configured there is no wrapper at all: pending propagates
as ordinary Solid 2 async. The previous behavior there was an invisible
`Solid.Loading` with a `null` fallback, which also converted errors to
pending. With pending UI configured, the boundary now renders on both
sides, so external SSR hydrates cleanly (server nodes claimed and
reused, no pending flash) and the pending UI keeps working for
post-hydration navigations — a client-only wrapper, even a settled one,
shifts hydration-key derivation and leaves the server nodes unclaimed.

Tests: matches-hydration-boundary.test.tsx pins the opt-in decision,
the protocol short-circuit, `disableGlobalCatchBoundary`, and that the
decision is identical whether or not a hydration pass is in flight (a
hydration-keyed decision would freeze `SafeFragment` into hydrated apps
permanently); server-mode matchesLoadingBoundary.test.tsx pins the
symmetric server output. Verified additionally against a real
`renderToString` -> `hydrate` round trip: zero hydration errors, zero
unclaimed nodes, server DOM reused by identity.

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

* ci: apply automated fixes

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-10 15:03:44 -05:00
github-actions[bot]
91a848e979
ci: Version Packages (#8021)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-09 20:43:56 +02:00
github-actions[bot]
6f8f534bf3
ci: Version Packages (#8011)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-09 11:01:57 +02:00
Manuel Schiller
c568caf3f3
inline isServer for proper DCE (#7996) 2026-08-08 09:54:57 +02:00
github-actions[bot]
995bd97a9f
ci: Version Packages (#7993)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-07 13:04:38 +02:00
Flo
ea3a665d81
fix(router): retain mounted UI during revalidation (#7992)
* fix(router): retain mounted UI during revalidation

* fix(router): preserve initial pending presentation

* changeset

* test(router): make retained pending tests deterministic

* complete solid/vue suite
2026-08-07 11:57:59 +02:00
github-actions[bot]
ac1d0abea9
ci: Version Packages (#7968)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-06 15:38:36 +02:00
Flo
94685306a9
perf: compact private bundle boundaries (#7975)
* perf(history): compact queued action kind

* perf(history): compact queued navigation state

* perf(history): derive queued action state

* perf(router-core): tuple lightweight route matches

* perf(solid-router): compact nearest match context

* perf(vue-router): reuse the computed scripts tuple

* perf(vue-router): flatten private href input

* perf(vue-router): flatten private active-state input

* perf(vue-router): flatten private style input

* perf(start): return fetch bodies without an internal wrapper

* test(history): cover browser action batching

* docs: record compact private boundary results

* Delete RESULT-optimization-compact-private-boundaries.md
2026-08-06 13:40:09 +02:00
Flo
2435885fa8
Create file routes directly (#7970)
* test createFileRoute factory behavior

* create file routes directly

* preserve createFileRoute parameter name

* cleanup

* changeset
2026-08-06 13:38:43 +02:00
Flo
86bf510c29
Pass intersection observer disabled state directly (#7971)
* test disabled viewport links in Vue

* test reactive intersection observer disabling

* pass intersection observer disabled state directly

* changeset
2026-08-06 13:38:04 +02:00
Flo
07a3d10d8f
fix(router): preserve raw params for match identity (#7966)
* fix(router): preserve raw params for match identity

* refactor(router): return matched routes as tuple

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-05 21:41:42 +02:00
github-actions[bot]
790e062820
ci: Version Packages (#7963)
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-05 20:18:34 +02:00