Skip to content

fix(insights): Repair legacy /performance/<module>/ redirects - #122407

Open
mrduncan wants to merge 1 commit into
masterfrom
mrduncan/fix-insights-splat-redirect
Open

fix(insights): Repair legacy /performance/<module>/ redirects#122407
mrduncan wants to merge 1 commit into
masterfrom
mrduncan/fix-insights-splat-redirect

Conversation

@mrduncan

Copy link
Copy Markdown
Member

Legacy /performance/<module>/* URLs redirected to a broken target that 404'd: /performance/database/ sent users to /insights/backenddatabase/:splat.

Two problems combined into that URL:

  • The domain view and module base URL were joined without a separator, producing backenddatabase instead of backend/database. Introduced when the domain view segment was added to the redirect target.
  • :splat was never substituted. It was a react-router 3 param name; react-router 6 exposes the wildcard match as *, and a redirectTo string is handed to Navigate verbatim, so nothing ever replaced it.

This opts for a simple fix to target module landing pages rather than build out wildcard interpolation.

Example replay (error at 2s): https://sentry.sentry.io/explore/replays/8cb8dbb5091f452d9c701838f5317e07/

Legacy `/performance/<module>/*` URLs redirected to a broken target that 404'd:
`/performance/database/` sent users to `/insights/backenddatabase/:splat`.

Two problems combined into that URL:

- The domain view and module base URL were joined without a separator,
  producing `backenddatabase` instead of `backend/database`. Introduced when
  the domain view segment was added to the redirect target.
- `:splat` was never substituted. It was a react-router 3 param name;
  react-router 6 exposes the wildcard match as `*`, and a `redirectTo` string
  is handed to `Navigate` verbatim, so nothing ever replaced it.

Rather than teach the redirect machinery to interpolate wildcards, the target
is now the module landing page. Sub-paths under a legacy module URL land there
instead of at their equivalent sub-path, which they have never reached anyway.
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 21, 2026
@mrduncan
mrduncan marked this pull request as ready for review August 21, 2026 17:59
@mrduncan
mrduncan requested a review from a team August 21, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant