Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Regression: Speed Insights not differentiating between paths due to Parallel Route catchAll. #67

Closed
steve-marmalade opened this issue May 17, 2024 · 1 comment

Comments

@steve-marmalade
Copy link

steve-marmalade commented May 17, 2024

Hi team, I think a somewhat recent change to NextJS has lead to a regression in Speed Insights.

Core problem: my dashboard shows primary a single path being hit /...catchAll, even though I'm certain that other paths are being navigated to.

image

The relevant part of my file structure is as follows:

app/@modal/[...catchAll]`
app/m/[merchantHandle]/p/[productSlug]

Taking a quick pass at the NextJS repo, my guess is that this regression was caused by one of the following PRs (probably 65063 from the magician @ztanner):
vercel/next.js#65063
vercel/next.js#65233
vercel/next.js#65277

Concretely, when I log the output of useParams and usePathname from a Client component in my root layout I see the following:

{"params":{"catchAll":["m","rowingblazers","p","the-croquet-stripe-rugby"],"merchantHandle":"rowingblazers","productSlug":"the-croquet-stripe-rugby"},"pathname":"/m/rowingblazers/p/the-croquet-stripe-rugby"}

Notice in the above that the params from useParams now includes the catchAll key in addition to the merchantHandle and productSlug keys. My guess is that the Speed Insights logic might need to be changed to something like "Use the params from a catchAll key if and only if there are no other dynamic params present."

Let me know if I can provide any other info to help debug. Thank you!

@feugy
Copy link
Member

feugy commented May 24, 2024

Hi @steve-marmalade and tanks a million for the detailed bug report.
This should be fixed with version 1.0.11, released this morning.

Please let us know if the fix is effective, and please reopen this ticket accordingly.

@feugy feugy closed this as completed May 24, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants