* 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 resolvedsolidjs/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>
* 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>
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>
`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>
* 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>
The frame decoder dropped consumed chunks from its buffer with
bufferList.shift(), which is O(n). When a single large frame (e.g. a big
RawStream payload) is assembled from many small network reads, the
extract loop calls shift() once per chunk, making reassembly O(n^2).
Track the first un-consumed chunk with a head pointer and advance it in
O(1) instead of shifting. Consumed slots are released for GC, and the
buffer is compacted when fully drained (O(1) reset) or once the consumed
prefix grows past a small threshold (amortized O(1) per chunk).
A micro-benchmark draining 1000 small chunks is ~11x faster.
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
* perf(router-core): faster enumerable-key collection in structural sharing
getEnumerableOwnKeys (used by replaceEqualDeep) called
Object.getOwnPropertyNames and then invoked propertyIsEnumerable once per
key to verify every own string prop is enumerable. Replace that O(n) loop
of JS method calls with Object.keys (native, enumerable-only) plus a
single length comparison against getOwnPropertyNames to detect
non-enumerable string props. Symbol handling is unchanged.
Behavior is identical (verified against the existing suite + fuzzing): the
function still returns the enumerable own keys in the same order and still
bails (returns false) for objects with any non-enumerable own string or
symbol property.
replaceEqualDeep runs on every selector result on every state update when
defaultStructuralSharing is enabled, so this is a hot client path for
selector-heavy apps. Measured ~1.3-1.5x faster on typical router state.
* style(router-core): address enumerable key review
---------
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
* perf(react-router): bail out of Link re-renders when href and active state are unchanged
useLinkProps subscribes to the location store with an identity selector and an
href comparator, then derives href and isActive from the published location in
downstream memos. The comparator can only ask "is this a different URL?", never
"does this link care?", so every Link on the page re-renders on every navigation.
Move the location-derived values into the selector and compare them, so a link
whose resolved href and active state are unaffected by a navigation bails out.
buildLocation still runs once per link per location change; what goes away is the
React render and the host reconciliation under it.
doPreload no longer pre-supplies _builtLocation, because the built location is no
longer kept in render state. preloadRoute already falls back to building it, which
is what handleClick has always relied on for router.navigate.
The isActive and externalLink bodies move to module-level helpers unchanged so the
selector stays readable; activeOptions is spread into its four primitive fields in
the dependency list because callers routinely pass an inline object literal.
* refactor: trim redundant comments and brace single-line bodies
The comments explained the bail-out rationale twice — once on the LinkState type
and again above the selector — and two helper docblocks restated their function
names. The rationale now appears once, where a reader meets the selector; the
detail belongs in the PR description rather than the source.
Also braces the three single-line if bodies, per the AGENTS.md rule that if/else
bodies always use curly braces.
* refactor: publish link state as a tuple
The type is erased either way, but the object literal's property names survive
minification and a tuple's positions don't — so this drops three property names
from the selector's return plus the three property reads in compareLinkState.
Measured on the unminified build: -54 bytes in dist/esm/link.js and the same in
dist/cjs/link.cjs.
* test: assert the published link state, and drop a redundant cast
The render-count assertions proved the bail-out but not that the selector still
publishes correct values, so a selector returning a constant could have passed.
The test now also asserts that the link gaining active state carries
`data-status="active"` afterwards (and does not beforehand), and that the
unaffected link keeps its href and stays inactive.
Checked by sabotaging the selector: returning a constant tuple with a wrong href
but a correct active state now fails, where previously it passed.
Also drops `as any` from `new URL(to)` in resolveExternalLink — the guard above
already narrows `to` to string.
* refactor: pass activeOptions through instead of destructuring
Depends on the four fields rather than the object, with an exhaustive-deps
disable: callers routinely pass an inline literal, which would otherwise rebuild
the selector every render. resolveIsActive reads only those four fields, so the
disable is not hiding a live dependency.
-269 bytes on each of dist/esm/link.js and dist/cjs/link.cjs (unminified).
* perf: memoize the href derivation on the built href
The `useMemo` chain this replaced keyed `getHrefOption` and the external-link
resolution on the href string, so a navigation that left a link's href alone
skipped both. Deriving everything in the selector ran them on every location
notification instead, which showed up as a ~10% regression on the client-nav
rewrites benchmark, where rewrite handling makes `getHrefOption` expensive.
Cache both on the built href inside the selector closure. Measured on a
five-link root layout, per navigation: getHrefOption drops from 5 calls back to
0, matching the pre-change profile, with buildLocation and the active-state
derivation unchanged at 5.
* perf: keep _options referentially stable while its contents are equal
Links commonly pass inline `params` / `search` object literals. Those change
identity on every parent render, which rebuilt `_options`, which changed the
store selector's identity, which discarded useSyncExternalStoreWithSelector's
memoized selection. buildLocation then ran twice per navigation: once in the
notification check and once in the render-phase selection.
Measured on a replica of the client-nav rewrites scenario (six links, root
subscribed to the pathname via useLocation), buildLocation per navigation:
base 7, before this commit 12, after 7.
* revert: drop the href memoization, it measured no benefit
Reverts 409371b. It did cut getHrefOption from 5 calls per navigation to 0,
matching the pre-change profile, but that is not where the time went: on the
rewrites scenario it moved the number by 0.05% (medians 245.33 vs 245.21 hz over
four interleaved rounds). Not worth ~15 lines of mutable closure state.
The rewrites regression is fixed by the _options stabilisation instead.
* docs: explain why useValueStable exists
Replaces a leftover scratch note.
* perf: cut the bundle cost of the link state selector
Stabilise `activeOptions` with the same helper used for `search` / `params`,
so the selector depends on one value instead of four destructured fields. That
also makes the dependency array honest, so the exhaustive-deps disable goes.
Drop the reference-equality guard in useValueStable: deepEqual already
short-circuits on `a === b`, so the guard only saved a function call that
returns immediately.
Measured with benchmarks/bundle-size against this branch's base, gzip delta
across the eight React scenarios moves from +27/-7 to +11/-24, and raw bytes go
uniformly negative (-37 to -45 on every scenario).
* perf: pass _options to preloadRoute without the shallow clone
The spread existed to add _builtLocation, which is gone, and nothing on the
preload path mutates the options object: preloadRoute only reads
opts._builtLocation, build() only reads dest fields, and the search middleware
chain only reads dest.search. Search middlewares themselves receive
{ search, next }, never dest.
Saves an object allocation per hover. Bytes are unchanged on gzip, -5 raw.
* fix: do not collapse explicit-undefined params when stabilising link options
useValueStable compared with deepEqual's default ignoreUndefined: true, which
skips undefined-valued keys on both sides, so `{}` and `{ category: undefined }`
compared equal. Those build different locations: an explicit undefined clears an
inherited optional param while an empty object inherits it. A Link whose params
changed from one to the other kept publishing the stale href, and click and
preload used the stale options too.
Compare with ignoreUndefined: false. Adds a regression test covering the
/posts/tech -> /posts transition, which fails before this commit and passes
after, and passes on the pre-PR baseline.
* chore: empty commit to re-trigger CI
* chore: add changeset
---------
Co-authored-by: Flo <me@florianpellet.com>
* perf(start-client-core): compact frame decoder result keys
* docs: record compact frame result evidence
* docs: record frame result attribution and e2e
* Delete RESULT-optimization-frame-decoder-compact-result.md
* changeset
Solid 2's streaming renderer resolves the modules behind server-rendered
lazy() boundaries through its `manifest` render option: it emits stylesheet
links and modulepreloads for the lazy chunk and serializes the module→asset
map the client needs to preload it before hydration. TanStack Start never
provided that manifest — its own start manifest is route-keyed and
intentionally excludes dynamic-import chunks — so direct visits to routes
with SSR'd lazy() components rendered without the lazy chunk's CSS and
logged "Asset manifest returned no client assets" on every request.
(Pre-merge this was masked: the old Match tree re-rendered the boundary
client-side after the failed hydration, fetching the CSS late via Vite's
dynamic-import helper.)
Wire up vite-plugin-solid's `virtual:solid-manifest` (dev module-graph
resolver in dev, the client build's `.vite/manifest.json` in builds), kept
entirely inside the solid packages:
- solid-router ships an inert `ssr/clientAssetsManifest` stub that the
renderers prefer over the route-keyed manifest when non-undefined
- solid-start's vite plugin swaps the stub for `virtual:solid-manifest` in
the server environment (with `isEntry` neutralized so Solid doesn't
duplicate the entry stylesheet Start already emits) and enables
`build.manifest` for the client build
- bundlers without the plugin (rsbuild) keep the stub and current behavior
Fixes the two shared-widget lazy-CSS tests in the solid-start
start-manifest e2e (10/10 passing; selective-ssr and basic suites verified
unaffected).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Solid 2 derives hydration keys from the reactive owner tree, and its server
onSettled stub consumes a child-id slot to mirror the client's effect owner.
The server early-return in Transitioner skipped that registration, shifting
every subsequent hydration key by one and causing a root-level hydration
mismatch that discarded the server-rendered HTML (breaking deferred/streaming
content and redirects in the solid-start e2e suites).
Run the same code on both sides again: the onSettled callback never executes
on the server, so only the owner-tree structure is shared.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Use the Start storage context for request cancellation and focused server entrypoints to keep unrelated route dependencies out of the RSC module graph. Add emitted-build regression coverage for the boundary.
fixes#7938