Which project does this relate to?
Router
Describe the bug
When a route has both a layout route and an index route, navigating to it (via <Link> or router.navigate()) emits a false positive dev-mode warning:
Generated path "/rsg/activity-reminder" for route "/_app/rsg/activity-reminder" matched route "/_app/rsg/activity-reminder/" instead.
This can happen when multiple route templates resolve to the same URL.
Use the route template that matches the intended route, or adjust params.stringify if it changed the target path.
Navigation works correctly — only the dev-mode validation is wrong.
Complete minimal reproducer
https://stackblitz.com/edit/github-iylugpqz?file=src%2Froutes%2Findex.tsx
Steps to Reproduce the Bug
- Create a layout route and an index route for the same path:
routes/
_app/
rsg.activity-reminder/
route.tsx # layout route
index/
route.tsx # index route
- Navigate to it:
<Link to="/rsg/activity-reminder">...</Link>
- Observe the console warning in development.
Expected behavior
No warning. A layout route with an index route is a standard pattern.
Screenshots or Videos
No response
Platform
@tanstack/react-router: 1.170.16
@tanstack/router-core: 1.171.13
Additional context
No response
Which project does this relate to?
Router
Describe the bug
When a route has both a layout route and an index route, navigating to it (via
<Link>orrouter.navigate()) emits a false positive dev-mode warning:Navigation works correctly — only the dev-mode validation is wrong.
Complete minimal reproducer
https://stackblitz.com/edit/github-iylugpqz?file=src%2Froutes%2Findex.tsx
Steps to Reproduce the Bug
Expected behavior
No warning. A layout route with an index route is a standard pattern.
Screenshots or Videos
No response
Platform
@tanstack/react-router: 1.170.16@tanstack/router-core: 1.171.13Additional context
No response