Skip to content

Limit profile search exclusions to profile routes - #262

Merged
manager merged 2 commits into
mainfrom
fix/profile-route-indexing
Nov 18, 2026
Merged

manager merged 2 commits into
mainfrom
fix/profile-route-indexing

Conversation

@manager

@manager manager commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Match the Pages Router profile route instead of searching case titles for a profile prefix. Preserve profile exclusions in fallback metadata. Verified all 189 localized UXCG case paths and the profile, certificate and persona routes.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Claude finished @manager's task in 14s —— View job


Review of PR #262

Verdict: looks good, no blocking issues.

  • router.pathname is the route template (/user/[userId]), not the resolved URL. startsWith('/user/') therefore matches only the profile route. The old pathname.includes('/user') also matched any case title containing "user". src/pages/user/[userId] exists, so the match is correct.
  • Adding isUserProfile || to the first robots meta keeps the profile exclusion in the fallback metadata, as the PR describes.
  • Both SeoGenerator copies (src/components and src/uxcore) changed the same way, so they stay consistent.

Minor, non-blocking:

  • Both components can emit two robots tags when the first Head block runs and the later block runs too. Next's Head dedupes by key or name, so this was already the case before the PR. It is worth checking that the later tag wins.
  • In src/components/SeoGenerator/SeoGenerator.tsx, isUserProfile is declared before the forceNoIndex early return. This is fine for hooks, because useRouter is already called first.

I read the diff and checked that the route exists. I did not run the app, tests or lint. I did not re-check the 189 UXCG paths the PR description mentions.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Claude finished @manager's task in 14s —— View job


Review of PR #262 (updated for the new commit)

Verdict: looks good, no blocking issues.

  • router.pathname is the route template, so startsWith('/user/') matches only the profile routes: [userId], [userId]/certificate and [userId]/[personaId]. The old pathname.includes('/user') also matched any case title containing "user". The router variable is in scope in both SeoGenerator copies.
  • isUserProfile || in the first robots meta keeps the profile exclusion in the fallback metadata. This is applied the same way in src/components and src/uxcore.
  • The new X-Robots-Tag: noindex, nofollow header in src/pages/user/[userId]/certificate.tsx:50 is set before the data fetch, so it also covers the 404 path.

Non-blocking notes:

  • src/pages/user/[userId]/index.tsx and [personaId].tsx don't set the header. They rely on the meta tag only. The meta tag is enough for HTML pages. If you want header-level coverage across the whole profile tree, it could go in next.config.js headers() instead of per page.
  • Both components can still emit two robots tags. This was already the case before the PR. Both now say noindex for profiles, so the result is consistent.
  • src/uxcore still derives isUserProfile from router.pathname while the other flags use asPath. That is intentional here and fine.

I read the diff and checked the routes and scope of router. I did not run the app, tests or lint, and I did not re-check the 189 UXCG paths from the description.

@manager
manager merged commit 96052cf into main Nov 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant