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

310 commits

Author SHA1 Message Date
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
3740f44786
docs: align loader docs with lane rewrite (#7949)
* docs: align loader docs with lane rewrite

* docs: refine lane loader documentation

* docs: expand link preloading guide
2026-08-04 22:23:02 +02:00
Flo
45c4ad8d62
fix(router-core): lane match loader rewrite (#7805)
* fix: lane match loader rewrite

---------

Co-authored-by: Manuel Schiller <6340397+schiller-manuel@users.noreply.github.com>
2026-08-04 20:28:11 +02:00
Ahmed Sabry
10dc3f63e6
docs: version optional param to only capture version not capturing "e… (#7932)
* docs: version optional param to only capture version not capturing "extra" as version

* fix: close template literal
2026-08-04 00:04:26 +02:00
Ahmed Sabry
2cb221cfd3
Fix typo in path-params documentation (#7931) 2026-08-01 14:15:16 +02:00
Sarah Gerrard
a76c192f1c
docs: Update Guides section and add back in missing pages (#7864) 2026-07-22 22:13:55 +02:00
Sajad Torkamani
2b08d9ba4b
docs: minor docs improvements (#7842) 2026-07-22 22:12:34 +02:00
Cong-Cong Pan
21a8597952
chore: add React Start basic Rsbuild example (#7729)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-22 22:09:03 +02:00
Zakher Masri
07ce90304d
docs: remove stray semicolon in i18n page (#7870)
fix: remove stray semicolon
2026-07-21 11:45:50 -07:00
Sajad Torkamani
6184661e56
docs: small improvements to wording (#7840) 2026-07-17 21:40:35 +02:00
dfedoryshchev
a2b9d51b0a
docs: fix duplicate "to" typos (#7370) 2026-06-12 22:55:18 +02:00
tsushanth
2215277382
docs(router): drop the broken "LLM Assistance Support" nav entry (#7617) 2026-06-12 21:31:42 +02:00
Nandkishor Jadoun
f111a38249
docs: add 🟡 (Experimental) for TanStack Start RSC support (#7573) 2026-06-07 15:02:31 +02:00
Ulrich Stark
fee0b58c51
refactor: remove unused dependencies (#7541) 2026-06-04 22:47:41 +02:00
Tanner Linsley
ccf87fbe6f
docs: clarify auth data boundaries (#7537) 2026-06-03 12:48:48 -06:00
Manuel Schiller
51a97a167f
feat(start): support rsbuild iife client output (#7477) 2026-05-24 02:02:05 +02:00
Flo
9f6258f23e
chore: update zod to v4.4.3 (#7441)
* chore: update zod to v4.4.3

* fix(start): preserve route path defaults

* fix(examples): resolve zod 4 build failures
2026-05-20 08:41:45 +02:00
Flo
d533f87976
feat(router-core): params.priority route option as tie breaker in matching algorithm (#7411)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-16 16:20:12 +02:00
Manuel Schiller
742941e2f1
fix: Fix literal underscore paths under pathless layouts (#7408) 2026-05-16 04:08:22 +02:00
Tanner Linsley
3526194849
docs(skills): address 8 agent failure modes from user feedback (#7314)
* docs(skills): address 8 agent failure modes from external feedback

Adds new start-core/auth-server-primitives skill (sessions, cookies,
OAuth+PKCE, password-reset enumeration defense, CSRF, rate limiting,
session rotation) and updates 8 existing skills + matching docs to fix
patterns where agents produce insecure or wrong-framework output.

Skill changes:
- new: start-core/auth-server-primitives (server half of auth)
- router-core/auth-and-guards: route guard != RPC guard
- start-core/server-functions: wrong import path, RPC auth required,
  Cache-Control public is a cross-tenant leak, wrong-framework patterns
- start-core/middleware: wrong import path, sendContext shape vs access
  (3-layer wrong/still-wrong/correct), authMiddleware framing
- start-core/execution-model: file markers (server-only/client-only),
  module-level process.env is undefined under Worker SSR
- start-core/deployment: cloudflare env-at-request-time
- router-core/ssr: wrong file structures (next.js, react-router-dom)
- router-core/type-safety: wrong-framework imports + structures

Docs updated to mirror each skill change so source-of-truth and the
intent-indexed skill stay in sync. New authentication-server-primitives
guide is the long-form companion to the new skill.

intent validate: 30 skill files pass (was 29).

* ci: apply automated fixes

* docs(skills): address coderabbit review feedback

- Fix internal docs links to use correct relative paths instead of an
  absolute /start/latest/... URL and missing one ../ segment
- Remove blank line inside auth-and-guards blockquote (markdownlint MD028)
- Restore overload pattern in type-safety ValidateNavigateOptions and
  ValidateRedirectOptions examples; the casts I had introduced stripped
  generic context and contradicted the skill's own no-cast rule
- Add db.sessions.revokeAllForUser before create in login rotation
  snippets so the example matches the prose
- Soften useServerFn guidance: it's required only when the server
  function throws redirect/notFound; plain-data calls work directly and
  via useMutation/useQuery

* ci: apply automated fixes

* docs(skills): compress type-safety to stay under 500-line cap

Prettier's autofix expanded my single-line overload signatures across
multiple lines, pushing the file over the 500-line limit. Drop the
redundant fetchOrRedirect example (same pattern as useDelayedNavigate)
and describe ValidateRedirectOptions usage in prose instead.

* docs(skills): CSRF origin check should compare full origin, not host alone

Comparing only new URL(origin).host against APP_HOST silently accepts a
mismatched scheme — http://example.com would pass a check meant for
https://example.com. Compare the full origin (scheme + host + port)
against APP_ORIGIN instead. Same fix in skill and docs.

* docs(skills): make useDelayedNavigate callback truly return void

The callback returned the result of setTimeout (a timer handle), not
void as the public overload's return type implied. Wrap in a block so
the example matches the declared return type.

Skipped the related nitpick to add a separate redirect example — the
existing prose already describes the same overload pattern, and a
duplicate example would push the file close to the 500-line cap that
prettier autofix has been bumping us against.

* docs(skills): fix two real bugs in auth-server-primitives examples

1. Cookie parser truncated values containing '='. Signed cookies, JWTs,
   and base64-padded values all use '='. Use indexOf to split on the
   FIRST '=' only.

2. Login example short-circuited verifyPasswordHash on user-not-found,
   contradicting the prose's "same time, same error" claim — the
   no-user branch returned instantly while wrong-password spent ~100ms
   hashing, leaking account existence over the wire. Always verify
   against a hash; use a precomputed DUMMY_PASSWORD_HASH when the user
   is missing, then combine with the user-exists bit for the final ok.

Same fixes in the SKILL.md and the docs companion.

* docs(skills): address manuel's review on react-specific guides

- middleware.md, server-functions.md: drop cross-framework <framework>
  placeholders; this is the React-specific guide, just say
  @tanstack/react-start
- execution-model.md: drop the same trailing line about solid-start /
  vue-start paths
- hosting.md: remove the Cloudflare env-handling subsection — the
  general per-request rule lives in environment-variables.md and
  doesn't need to be repeated under a specific host
- environment-variables.md: mention the cloudflare:workers env binding
  as the canonical Cloudflare way to read env (including module scope),
  per Manuel's link to the Cloudflare docs
- deployment skill: same upgrade — show the cloudflare:workers env
  pattern alongside the per-request handler approach

* docs(skills): drop redundant server-only marker in session example

The file already imports from @tanstack/react-start/server, which is
on import protection's default client-deny specifier list. The
side-effect marker is redundant — drop it. Same fix in skill and docs.

* docs(skills): drop wrong-import-path mistakes — TS already catches them

Manuel pointed out that TypeScript catches both common wrong paths:
'@tanstack/react-router' has no exported member createServerFn /
createMiddleware, and '@tanstack/start' is "Cannot find module". Skill
space is precious; the items don't earn their slot if tsc handles them.

Removed:
- Common Mistake "Wrong import path" from server-functions and
  middleware skills (renumbered the remaining mistakes)
- The matching top-of-file CRITICAL line in both skills
- The "Import path" callouts in the middleware and server-functions
  docs

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-02 23:11:30 -06:00
Franklin Shera
e8ef12b020
docs: remove redundant code example from query integration doc (#7298) 2026-04-30 21:50:39 +02:00
Manuel Schiller
c992495bf4
feat: match params (#7263) 2026-04-30 19:47:07 +02:00
Pavan Shinde
b515cbe1fe
docs(router): fix typo in doc (#7268) 2026-04-26 04:45:16 +02:00
Dominik Dorfmeister 🔮
b12f57bbb4
feat(query): add support for custom dehydrate and hydrate options in SSR integration (#7246)
Co-authored-by: schiller-manuel <6340397+schiller-manuel@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-25 22:17:12 +02:00
Manuel Schiller
8e7f4c81cc
fix docs (#7168) 2026-04-13 02:21:07 +02:00
Mohamed Khaled
9797eac29d
docs: fix file extension syntax for prefix/suffix routing examples (#7149)
docs: fix file-based routing examples with literal dots
2026-04-11 22:10:05 +02:00
육기준
a1ab264634
fix: unexported ShouldBlockFnLocation interface causes TS4023 (#7037)
Co-authored-by: yook-gijun <gijun@dreamend.com>
2026-03-26 18:06:49 +01:00
Tanner Linsley
837917a40c docs: add router events guide 2026-03-23 12:59:21 -06:00
Szymon Kurek
8d5ea2d24e
docs: use @tanstack/cli to create tanstack/router app (#7008) 2026-03-23 18:54:46 +01:00
Manuel Schiller
6164816414
feat: transformAssets (#7009)
* feat: transformAssets

replaces transformAssetUrls

* fix

* fix
2026-03-22 20:25:12 +01:00
Rob Ballou
13d314ece4
docs: update search parameters guide for zod v4 (#6956) 2026-03-20 11:02:50 +01:00
Flo
054523900b
refactor: signal based reactivity (#6704) 2026-03-20 10:33:28 +01:00
Birk Skyum
7d936c6c36
docs: update examples/e2e to vite 8 (#6958) 2026-03-17 20:37:11 +01:00
Soheil
29c0201441
docs: import defaultRenderHandler instead of renderRouterToString in … (#6776)
docs: import defaultRenderHandler instead of renderRouterToString in ssr.md 

example using defaultRenderHandler imports renderRouterToString instead of defaultRenderHandler

Co-authored-by: Nico Lynzaad <44094871+nlynzaad@users.noreply.github.com>
2026-03-14 13:31:45 +02:00
Manuel Schiller
6f297a2494
feat: add staleReloadMode (#6921)
* feat: add staleReloadMode

* update

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-14 08:41:38 +01:00
Manuel Schiller
31ed0a9648
fix: don't re-execute stale loaders on unrelated location changes (#6867)
* fix: don't re-execute stale loaders on unrelated location changes

* lint

* remove loaderKeyChanged

* from last

* inline staleMatchShouldReload

* update tests

* add test

* fix

* revert
2026-03-09 20:02:35 +01:00
Chapman Cheng
4ea2a62787
docs: Update route file name in routing concepts (#6807)
fix: Update route file name in routing concepts

The code block title `src/routes/posts.tsx` does not match against the line above `posts.$postId.tsx`

This pr fixes this typo
2026-03-07 03:19:13 +01:00
Manuel Schiller
9c81d5ac57
fix: handle beforeLoad throwing notFound correctly (#6811) 2026-03-04 21:34:28 +01:00
Manuel Schiller
190edb1a8d
feat: allow to set extension for route imports in generator (#6790) 2026-03-01 03:08:23 +01:00
JongKyung Lee
9fd7fb95c6
docs(router): add MaskOptions to Navigation documentation (#6625) 2026-02-24 20:06:53 +13:00
combab0
623cbb0de4
docs(router): fix typo in the path param guide for complex suffixes (#6738) 2026-02-24 19:56:39 +13:00
Ulrich Stark
1870dc744f
docs: fix grammar and remove duplicate words (#6726) 2026-02-21 21:53:10 +01:00
Ulrich Stark
31ae74fc72
docs: fix syntax error in create-route-property-order.md (#6711)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-21 03:47:05 +01:00
Sean Cassiere
8bdf8d6df7
docs: move the react-only guides to top-level and restrict in config.json (#6713)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-20 22:45:33 +13:00
Ulrich Stark
c87d84893b
docs: fix syntax error in create-route-property-order.md (#6699)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-19 23:56:55 +01:00
Ulrich Stark
149e760255
docs: add NotFoundError to lint exceptions and fix wording (#6701) 2026-02-19 23:55:46 +01:00
Pavan Shinde
c96fe3dc9f
docs: fix useCanGoBack link path (#6684) 2026-02-18 02:07:47 +13:00
Stefan Ollinger
cf5a26984d
docs: Fixed filenames (#6675)
Fixed filenames
2026-02-15 22:27:26 +01:00
SeanCassiere
027dc05817
docs(eslint): update installation to use unified tabbed markup 2026-02-16 00:11:24 +13:00
Sean Cassiere
e8c5dd0b11
docs(router): restructure docs to use the unified markdown syntax (#6665)
* docs: move overview page

* docs: move all top-level guides to use generic syntax

* make comparison generic

* apply coderabbit suggestions

* docs: move installation guides

* docs: move integrations

* docs: move routing

* docs: move router reference api

* docs: move guides

* docs: fixup links to guides from api reference

* docs: other fixups

* build(llms): LLM generation to account for doc structure change
2026-02-15 21:00:22 +13:00