router icon indicating copy to clipboard operation
router copied to clipboard

Pathless directories after dynamic directory is not properly excluded in URL

Open austinm911 opened this issue 1 year ago • 0 comments

Describe the bug

See discord discussion

See Reproduction

  • Navigate to New Layout Directory,
  • runtime pathname is /123/detail-layout/route2/123 but the route ID is /_auth/$teamId/_detail-layout, detail-layout is included in the URL
  • original layout route which is nested in _auth but not $teamId works as expected, with runtime path /layout-a

This also causes issues when referring to the ID of the path name, i.e. from RouteApi because of the pathless directory mismatch

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-cqjfmc?file=package.json

Steps to Reproduce the Bug or Issue

See above

Expected behavior

See above

Screenshots or Videos

No response

Platform

System: OS: macOS 14.2.1 CPU: (10) arm64 Apple M1 Pro Memory: 161.20 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 21.5.0 - ~/.nvm/versions/node/v21.5.0/bin/node Yarn: 1.22.21 - /opt/homebrew/bin/yarn npm: 10.2.5 - ~/.nvm/versions/node/v21.5.0/bin/npm pnpm: 8.14.1 - ~/Library/pnpm/pnpm bun: 1.0.22 - /opt/homebrew/bin/bun Browsers: Brave Browser: 120.1.61.109 Chrome: 120.0.6099.129 Edge: 120.0.2210.133 Safari: 17.2.1

Additional context

No response

austinm911 avatar Jan 14 '24 19:01 austinm911