Which project does this relate to?
Router
Describe the bug
Taking the example route from the documentation of posts/{-$category}, this is documented to match both /posts and /posts/category.
While this normally works as expected, if a "route" component exists, such as this:
posts/
{-$category}.tsx
route.tsx
/posts now fails to match anything. The route.tsx is rendered but the outlet is just left empty. If route.tsx is removed, the category route is rendered as expected.
This looks related to things like #5799 and #5635, but the fix attached to both those issues seems to have already landed and did not resolve this issue.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-3ccfbxyn?file=src%2Froutes%2Fposts.%7B-%24category%7D.tsx
Steps to Reproduce the Bug or Issue
- Visit the StackBlitz link (modified from the "Basic (file-based)" example)
- Navigate to "Posts"
- Observe that "no category" fails to match, but categories A and B are fine.
- Rename/delete
posts.route.tsx and observe the "no category" route rendering fine.
Expected behavior
The URL /posts matches posts/{-$category}.tsx as expected/documented.
Screenshots or Videos
Example from the router devtools in my app:

Despite the route being /workspaces/some-workspace-id, the {-$folderId} route does not match.
Platform
- Router / Start Version:
1.136.17
- OS: Windows
- Browser: Both Chrome/Edge
- Browser Version:
>= 142.0
- Bundler:
vite
- Bundler Version:
7.1.7
Additional context
No response
Which project does this relate to?
Router
Describe the bug
Taking the example route from the documentation of
posts/{-$category}, this is documented to match both/postsand/posts/category.While this normally works as expected, if a "route" component exists, such as this:
/postsnow fails to match anything. Theroute.tsxis rendered but the outlet is just left empty. Ifroute.tsxis removed, the category route is rendered as expected.This looks related to things like #5799 and #5635, but the fix attached to both those issues seems to have already landed and did not resolve this issue.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-3ccfbxyn?file=src%2Froutes%2Fposts.%7B-%24category%7D.tsx
Steps to Reproduce the Bug or Issue
posts.route.tsxand observe the "no category" route rendering fine.Expected behavior
The URL
/postsmatchesposts/{-$category}.tsxas expected/documented.Screenshots or Videos
Example from the router devtools in my app:

Despite the route being
/workspaces/some-workspace-id, the{-$folderId}route does not match.Platform
1.136.17>= 142.0vite7.1.7Additional context
No response