Skip to content

Change in behavior for nested routing with trailing splat #5969

@pveierland

Description

@pveierland

Which project does this relate to?

Router

Describe the bug

Up to and including v1.136.4, the routes /alpha/bravo/$charlie and /alpha/bravo/$charlie/$ would both match the URL path /alpha/bravo/charlie. This behavior appears to have changed in v1.136.5, where the route /alpha/bravo/$charlie is matched and the route /alpha/bravo/$charlie/$ is no longer matched on this URL path.

Your Example Website or App

https://stackblitz.com/edit/github-rxf8ufwa-5rpvurpg

Steps to Reproduce the Bug or Issue

Expected behavior up to and including v1.136.4

  1. Go to https://stackblitz.com/edit/github-rxf8ufwa
  2. Click the link "Shallow view" to navigate to /alpha/bravo/charlie.

Both the shallow and deep route are now matched as expected:

Image

Altered behavior following v1.136.5

  1. Go to https://stackblitz.com/edit/github-rxf8ufwa-5rpvurpg
  2. Click the link "Shallow view" to navigate to /alpha/bravo/charlie.

Now only the shallow route is matched and the deep route is not matched, which appears to be a change in behavior and not as expected.

Route view /alpha/bravo/charlie (shallow):

Image

Route view /alpha/bravo/charlie/delta/echo/foxtrot (deep):

Image

Expected behavior

I expect the behavior which existed in v1.136.4 where both the shallow and deep route was matched.

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.139.6
  • OS: NixOS 25.05.20250522.55d1f92 (Warbler)
  • Browser: Firefox
  • Browser Version: 138.0.4 (64-bit)
  • Bundler: Vite
  • Bundler Version: See repro links.

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions