* fix(router-devtools-core): restore embedded panel styling
All devtools size tokens are `calc(var(--tsrd-font-size) * n)`, but only the
floating devtools set `--tsrd-font-size` (via JS). The embedded
TanStackRouterDevtoolsPanel never had it defined, so every size declaration
was dropped: inherited font sizes, zero padding/gap/indentation and invisible
route status dots. Regressed in #1222 (v1.17.0).
Fall back to `1rem` when the variable is unset. Floating behavior is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(react-router): read devtools mode from a validated search param
Use root route validateSearch + useSearch instead of raw URLSearchParams,
and render the shadow DOM panel through a portal instead of mounting the
whole app in a shadow root.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(react-router): validate devtools search param with zod
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(react-router): add links to switch devtools variants
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(start-plugin-core): define TSS_SHELL in Rsbuild dev for SPA mode
In Rsbuild dev mode, `source.define` now sets `process.env.TSS_SHELL` and `import.meta.env.TSS_SHELL` from `startConfig.spa?.enabled` (`"true"` when SPA mode is enabled, `"false"` otherwise). Before this, Rsbuild dev never defined `TSS_SHELL`, so with `spa: { enabled: true }` it server-rendered the matched route and ran its loader on the server instead of serving only the shell. Build and preview are unchanged: the define is added only when `isDev` is true.
Changes:
- `packages/start-plugin-core/src/rsbuild/plugin.ts`: add the dev-only `TSS_SHELL` defines to the Rsbuild define block.
- `packages/start-plugin-core/tests/rsbuild/spa-shell-define.test.ts`: new test that calls the plugin's `modifyRsbuildConfig` hook. It checks that `TSS_SHELL` is `"true"` in dev with SPA enabled, `"false"` in dev without SPA, and not defined in build.
- `.changeset/rsbuild-spa-dev-shell.md`: patch changeset for `@tanstack/start-plugin-core`.
Fixes#8543
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Assisted-by: claude-sonnet-5-5 (via Claude Code)
* test(start-plugin-core): check the SPA shell on a real Rsbuild dev server
- `src/rsbuild/plugin.ts`: the `TSS_SHELL` define gets #8817's comment.
- The regression test serves a real app with `rsbuild dev` (a new
`startRsbuildDevServer` in `tests/integration/start-app.ts`) and fetches
its `/` route: with `spa.enabled` the loader no longer runs on the
server; without it, the control still renders the route there. This is
#8817's `integration/rsbuild/dev-server-config.test.ts` scenario, and it
replaces the unit test that stubbed the plugin API.
- The changeset says what users see.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(start-plugin-core): the SPA dev test checks the shell and counts loader runs
The SPA test only checked a 200 without `MARK_SERVER`, which an empty
answer or a loader run whose output the shell drops would also pass.
The root route now renders its own text, so the SPA answer must hold it
without the `/` route's; the loader counts its runs on `globalThis`
(Rsbuild dev runs the server bundle in the test's process), so the SPA
test asserts none and the control asserts one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(react-start): check the dev SPA shell with an e2e on Vite and Rsbuild
Replace the synthetic Rsbuild integration test with one e2e in
e2e/react-start/basic, run against both dev servers:
test:e2e--vite-spa--dev and test:e2e--rsbuild-spa--dev
(playwrightModes with E2E_DEV_SERVER, no app build, the shared dev
server prewarm). spa-shell.spec.ts checks that the raw document is the
shell, that the route's loader and beforeLoad run in the browser, and
that client navigation works from the shell. It runs in the prod SPA
mode too.
tests/integration/start-app.ts is back to main's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Co-authored-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Co-authored-by: Sheraff <me@florianpellet.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
fix(vue-start): pre-bundle @tanstack/vue-store so a cold dev start doesn't reload
Vue Start excludes `@tanstack/vue-router` from optimization, so Vite's
scanner never sees its `@tanstack/vue-store` import. Discovered while the
first page loads, it imports `vue` and re-chunks the already optimized
`vue`: Vite logs "optimized dependencies changed. reloading" and reloads
the page on every cold start. Declare it through `optimizeDeps.include`,
as React Start does for `@tanstack/react-store`.
From #8817.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The shared Babel parser options set `decoratorsBeforeExport: true`, so
`export @dec class Store {}` failed to parse. The route generator logged
the error and wrote no route tree, and the code splitter left the route
unsplit. Start's compilers use the same options.
Dropping the option lets Babel accept decorators on either side of
`export`; decorators before `export` still print where they were.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-plugin): write `import.meta.hot.accept(` out in Vite route HMR
Vite's import analysis marks a module as a hot boundary only when its
code spells `import.meta.hot.accept(` out. The route HMR code called it
through `const hot = import.meta.hot`, so a route module no framework
plugin accepted (a `.ts` route file, or an app without
`@vitejs/plugin-react`) reloaded the page on every edit.
The React HMR code also declared a top-level `const hot`, which made a
route file with its own `hot` binding fail with `Duplicate declaration
"hot"`. Both now read `import.meta.hot` directly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(router-plugin): keep the user's `hot` binding in the module under test
Split, the component reading `hot` moves to its chunk, and with it the
user's `const hot`, so the served route module no longer holds the
binding the HMR code could collide with. Serve the route unsplit and
assert the declaration is still there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(start-plugin-core): require exsolve ^1.1.3 and bypass its cache for entry lookups
exsolve caches a failed `try: true` lookup as an Error in its
process-wide cache. Before 1.1.2 that Error kept its call sites, and
with them its callers, alive for the life of the process (unjs/exsolve#63),
so each build in one process left its objects behind. Require ^1.1.3.
The cache also kept misses: Start looks up its optional entries
(`src/start.ts`, `src/client.tsx`, `src/server.ts`) once per plugin
instance, and a dev server restart got the cached miss for an entry
created since. Entry lookups now pass `cache: false`.
From #8817.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(changeset): narrow the exsolve memory claim
exsolve still caches lookups, and other packages in an app's build (for
example Nitro, which bundles an older exsolve) share its process-wide
cache. Say what the bump fixes: Start's cached failed lookups no longer
keep each build's objects alive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-plugin): omit browser warnings from production bundles
* fix(router-plugin): only the bundler's mode keeps the warning out of the page
The code splitter always passes isProduction, so the NODE_ENV fallback in the compiler was reachable only from direct test calls. The changeset now names the bug users see.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(router-plugin): real webpack and Rspack production builds ship no splitter warning
Builds an app whose route exports its component, with mode 'production' and with mode left out, and checks that no emitted JS names the app's absolute path. Fails on main. Replaces the fake-compiler matrix in router-plugin-context.test.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Sheraff <me@florianpellet.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(start-plugin-core): keep the app's server.compress on Rsbuild
The Rsbuild plugin always set `server.compress: false`, so an app's
`server: { compress: true }` had no effect (#8544). It now sets it only
when the app leaves it unset: a compressed streamed page reaches the
browser only once the stream ends.
From #8817. Rsbuild merges its defaults (`compress: true`) into the
config before `modifyRsbuildConfig`, so the check reads the app's own
config through `api.getRsbuildConfig('original')`.
Fixes#8544
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(start-plugin-core): require @rsbuild/core ^2.0.5 for Start's Rsbuild plugin
Now that an app's `server.compress: true` takes effect, Rsbuild 2.0.0 to
2.0.4 would corrupt SSR response headers: their compression middleware
reads the raw header array `writeHead` form as an object. Rsbuild 2.0.5
fixed it (web-infra-dev/rsbuild#7613). Raise the optional peer of
start-plugin-core, react-start, solid-start and vue-start to ^2.0.5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(start-plugin-core): pass Start's router options through to the generator and splitter
- `router.plugins` reach the route generator (#7768): one shared
`startGeneratorConfig` (from #8817) appends them after Start's own
generator plugins, on Vite and Rsbuild.
- A function-form `routeTreeFileFooter` is called at every print; Vite
no longer caches its first result.
- Rsbuild's server build keeps `codeSplittingOptions.deleteNodes`.
- Vite matches the client route tree by its exact id (#8839), not by an
unescaped `new RegExp(path)`.
Regression tests build and serve real Start apps with the built
`@tanstack/react-start` plugins (`tests/integration/start-app.ts`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(start-plugin-core): link the test apps' packages with junctions on Windows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(start-plugin-core): run the real-build tests in their own test:integration target
The cross-platform unit-test job (Linux arm64, Windows) timed out in the
Vite dev footer test: the dev server never picked up the new route file.
`test:unit` goes back to main's dependencies (`^build`); the real-build
tests move to a `test:integration` target that builds this package and
`@tanstack/react-start` first. `test:pr`/`test:ci` run it, so it runs in
the Linux `Test` job only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(start-plugin-core): wait for the dev server's file watcher before adding a route
The generator prints the first route tree in `configResolved`, before
Vite creates its watcher, so the first tree says nothing about the
watcher being ready. A route file written during the watcher's initial
scan is taken as an existing file and never reported (no `add`), which
is how the footer test timed out on Linux arm64 and Windows. The test
now writes a file the generator ignores until the watcher reports it,
then adds the route once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* test(router-plugin): split routes' source maps point at the route file
Real webpack and Rspack builds, and Vite's dev server: a throw in a split
component, and in code it shares, maps to its line in the route file, and
the map names the route file rather than its ?tsr-split / ?tsr-shared id.
Fails on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-plugin): point split routes' source maps at the route file
- Require unplugin ^3.5.0: its webpack/Rspack transform loader dropped a
plugin's map when no earlier loader passed one (unjs/unplugin#626).
- Name the route file, not the ?tsr-split / ?tsr-shared module id, as the
source of split and shared modules' maps.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(router-plugin): wait for the compiler to close before removing the app
runCompiler settled before compiler.close finished, so the test could remove
the app while webpack or Rspack was still shutting down, and a close error
went unreported.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(react-start-client): call HydrationBoundary hooks before the visible() gate
* fix(react-start-client): align the visible() fix with #8817 and test it through hydration
- Destructure only `o` and read `props.g` inline: keeps the deferred-hydration
client gzip at main's (+6 B with both destructured after the reorder).
- Replace the client-render test with a hydration test that runs the
intersection in each task around the boundary's first hydration attempt and
asserts no recoverable error. It fails on main.
- Use the changeset wording of #8817.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Sheraff <me@florianpellet.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-generator): type route-group layouts with full path `'/'`
A pathless layout inside a route group (`/(group)/_layout`) strips down
to `/`, and dropping the trailing slash left `''` in `FileRoutesByPath`.
The router gives that layout the full path `/` at runtime, as it does for
a pathless layout outside a group.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-generator): a childless route-group layout next to the index route still generates
With route-group layouts now typed with the full path `/`, a layout
without child routes yet (`(group)/_layout.tsx` or `(group)/route.tsx`)
next to `index.tsx` failed generation with "Conflicting configuration
paths", where it used to generate. Pathless and route-group layouts match
no URL of their own, so the full-path uniqueness check skips them, as
#8817 does. This also lets a childless `_auth.tsx` next to the index
route generate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-generator): a pathless layout that carries a path still conflicts
`foo/_layout.tsx` without `foo.tsx` is given `path: '/foo'`, so it
matches `/foo` like `(group)/foo.tsx` or `foo_.tsx` does. Main rejected
that pair as conflicting; the previous commit skipped every pathless
layout in the full-path uniqueness check and let both through. Skip only
the layouts the route tree gives no `path`, using the same condition the
tree printer uses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-generator): keep main's full-path conflicts, change only the types
The route tree lists the index route before a pathless layout, and the
router then matches `/` to a childless `_auth.tsx` instead of the index
route. Main refused that pair; skipping pathless layouts in the
uniqueness check let it through. Keep the check on main's key instead: the
stripped full path, which is `''` for a route group's layout, so a
childless group layout still generates next to the index route as on
main. Only the types use `'/'`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore: require Node ^20.19.0 || >=22.12.0 in engines
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: say why the Node engines range narrows in the changeset
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The option was undocumented. The webpack and Rspack entries overwrote it
with `'webpack'`, and on Vite `'webpack'` emitted `import.meta.webpackHot`,
which broke route HMR. The HMR style is now an internal parameter: the
composed plugin derives it from the bundler unplugin reports, and the
standalone webpack/Rspack code-splitter entries pass `'webpack'`.
Split out of #8817.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(router-plugin)!: remove `compilerPlugins` and splitter internals from the root entry
Remove the experimental `codeSplittingOptions.compilerPlugins` hook and
stop exporting the Babel splitter's internals from the package root:
`unpluginRouterCodeSplitterFactory`, `getObjectPropertyKeyName`,
`CodeSplitCompilerPlugin`, `ReferenceRouteCompilerPlugin`,
`ReferenceRouteCompilerPluginContext` and
`VirtualRouteSplitNodeCompilerPluginContext`.
Split out of #8817.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: make the changeset a patch
The removed option and exports were internal, not public API.
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(router-plugin): throw on autoCodeSplitting with esbuild
The esbuild plugin silently bundled every route without splitting when
`autoCodeSplitting` was enabled. It now throws a clear error, and
`TanStackRouterCodeSplitterEsbuild` always throws. Route generation is
unchanged. Extracted from #8817.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(router-plugin): drop autoCodeSplitting from the esbuild skill example
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(start-plugin-core): skip the Rsbuild import-protection loader when disabled
- With import protection disabled, the Rsbuild integration still added
its post loader for every JS and TS module, node_modules included,
plus its virtual modules plugin. The loader returned at once, but every
module still paid for a loader step.
- Register nothing when import protection is disabled, as the Vite
plugin does.
* test(start-plugin-core): drop the disabled import-protection unit test
* fix(start-plugin-core): skip unchanged server function resolver rebuilds in Rsbuild dev
- Skip the resolver rebuild at the end of make when the resolver has not
been written since this compiler last rebuilt it. Rebuilding an
unchanged resolver made Rspack rebuild the server chunk graph after
every edit.
- Child compilations still rebuild every time and do not change the
parent compiler's state.
- The RSC resolver hook skips unchanged writes in dev, like the non-RSC
hook.
* docs: drop the COMPILER_ARCHITECTURE.md change
* perf(start-plugin-core): skip resolving member calls on non-namespace receivers
A top-level `a.b()` initializer was a direct-call candidate for any `a`, so
`const Input = z.object({...})` resolved `z` and, in dev, loaded and parsed all
of zod through `?server-fn-module-lookup` while every compiled file waited.
For a receiver that is not a namespace import, resolution gives the call the
kind of the receiver itself, which only yields a candidate when the receiver
is an env-only factory and the code calls one of its properties. Skip those
calls; namespace calls, identifier calls and method chains resolve as before.
Refs #8757
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(start-plugin-core): cover member calls across compiler modes
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Sheraff <me@florianpellet.com>
* bump node version to 26.10.0
* run benchmarks on .nvmrc changes
* Rename client-nav-benchmarks.yml to benchmarks.yml
* chore(ci): update references to the renamed benchmarks workflow
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The measurement target was named `build`, so `test:pr`/`test:ci` and
`build:all` picked it up via `--targets=...,build`. Its cache entry was
never reused: the Bundle Size workflow runs with NX_NO_CLOUD and
--skipRemoteCache. Rename it to `measure` (with explicit `cache: true`,
previously inherited from the `build` target default).
Since dependency-only changes no longer reach this target through
`nx affected`, add `.nvmrc`, `package.json` and `pnpm-lock.yaml` to the
Bundle Size workflow path filters so toolchain bumps are still measured.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Disabling route generation also silently disabled autoCodeSplitting,
because the code splitter relies on route metadata populated by the
generator. Remove the option instead of patching the interaction, so the
generator always runs.
Closes#5087
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@tanstack/intent 0.5.4 rejects SKILL.md links that resolve outside the
owning package, which fails the "Validate intent skills" CI job. Replace
those relative links with `<package>#<skill>` identifiers that
`intent load` resolves regardless of node_modules layout.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The skills added in #6866 were never published for @tanstack/react-router
because its `files` list, unlike the other packages with skills, omitted
`skills`.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf: lower manifest script preload priority
* fix(start-server-core): forward fetchPriority into static Early Hints
Static script hints were built from getScriptPreloadAttrs but copied only
href, rel, as and crossOrigin, so Chromium started hinted preloads at
MEDIUM before the HTML's fetchPriority="low" arrived. Build them with the
shared addEarlyHintFetchAttrs helper, which the dynamic hint path already
uses, so fetchPriority (and crossOrigin) are carried into 103 hints and the
response Link header.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: cover low-priority manifest preloads in Solid and Vue
Add a Solid server-suite SSR test for module and IIFE preloads and assert
fetchpriority="low" on rendered preloads in the Solid and Vue HeadContent
tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: note low-priority JavaScript Early Hints
Mention that JavaScript Early Hints carry fetchpriority=low and extend the
changeset to start-server-core.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): bump srvx to ^1.0.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): bump @vitejs/plugin-rsc to ^0.5.37
0.5.37 depends on srvx ^1.0.5, which drops the last srvx 0.11 copy from
the lockfile. It is temporarily excluded from minimumReleaseAge until it
is 24h old.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore: drop minimumReleaseAge exclusion for @vitejs/plugin-rsc
0.5.37 is now older than the 24h minimum release age.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(ci): TEMP experiment - rsc e2e on srvx 0.10 (revert before merge)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Revert "test(ci): TEMP experiment - rsc e2e on srvx 0.10 (revert before merge)"
This reverts commit 2c7279a0b9.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
test(rsc): wait for streamed notifications instead of fixed sleeps
The progressive-streaming tests slept 500ms and expected the initial batch
of 3 notifications to be rendered. React throttles Suspense reveals by
300ms, so the batch can legitimately land after that window. Wait for the
3rd notification, assert the stream is still open with fewer than all
notifications, then wait for the next one and for completion.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>