Skip to content

Fix integration detail page 404 from route shadowing#8103

Merged
JadeCara merged 3 commits into
mainfrom
fix/integration-detail-route
May 5, 2026
Merged

Fix integration detail page 404 from route shadowing#8103
JadeCara merged 3 commits into
mainfrom
fix/integration-detail-route

Conversation

@JadeCara
Copy link
Copy Markdown
Contributor

@JadeCara JadeCara commented May 4, 2026

Summary

Error [PageNotFoundError]: Cannot find module for page: /integrations/testjirae2e
    at ignore-listed frames {
  code: 'ENOENT'
}
 GET /integrations/testjirae2e 404 in 322ms (next.js: 173ms, application-code: 150ms)
  • Fix: Move [id].tsx[id]/index.tsx so the detail page and nested routes (edit-dataset) coexist correctly

Test plan

  • Navigate to any integration detail page (e.g. /integrations/<key>) — should load instead of 404
  • Navigate to /integrations/<key>/edit-dataset — should still work
  • Integration list page (/integrations) — unaffected

🤖 Generated with Claude Code

ENG-564 (#7687) added `pages/integrations/[id]/edit-dataset.tsx`, creating
a `[id]/` directory that shadows the existing `[id].tsx` dynamic route.
Next.js resolves the directory over the file, but since there's no
`index.tsx` inside, all `/integrations/<key>` routes return 404.

Move `[id].tsx` into `[id]/index.tsx` so both routes coexist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment May 5, 2026 3:04pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored May 5, 2026 3:04pm

Request Review

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JadeCara
Copy link
Copy Markdown
Contributor Author

JadeCara commented May 4, 2026

/code-review

Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: PR #8103 — Fix integration detail route

Summary: This is a minimal, surgical fix. The change renames clients/admin-ui/src/pages/integrations/[id].tsxclients/admin-ui/src/pages/integrations/[id]/index.tsx. No code is modified — it's a pure file move.

What the fix does

Next.js uses file-based routing. When ENG-564 added a nested route directory (e.g. integrations/[id]/some-child-route/), it created a conflict: Next.js cannot have both a [id].tsx file and a [id]/ directory at the same level — the directory wins, causing the [id].tsx page to effectively shadow out and return 404. Converting the file to [id]/index.tsx resolves the conflict while preserving the exact same URL (/integrations/:id).

Review findings

Correctness: The fix is correct. This is the standard Next.js pattern for converting a page file to a layout-compatible index route when a sibling directory with the same name is needed.

No logic changes: File content is 100% identical (similarity index 100%), so no functional regression is possible.

Changelog: A changelog entry is included and accurately describes the fix.

No concerns: No issues found. The change is minimal, well-scoped, and solves the reported 404 correctly.


🔬 Codegraph: connected (48932 nodes)


💡 Write /code-review in a comment to re-run this review.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Title Lines Statements Branches Functions
admin-ui Coverage: 8%
6.57% (2975/45247) 5.86% (1525/25997) 4.64% (620/13345)
fides-js Coverage: 78%
79.43% (2013/2534) 66.13% (1244/1881) 73.09% (345/472)
privacy-center Coverage: 88%
85.97% (331/385) 81.36% (179/220) 78.87% (56/71)

@JadeCara JadeCara marked this pull request as ready for review May 5, 2026 15:01
@JadeCara JadeCara requested a review from a team as a code owner May 5, 2026 15:01
@JadeCara JadeCara requested review from gilluminate and removed request for a team May 5, 2026 15:01
Copy link
Copy Markdown
Contributor

@lucanovera lucanovera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't reproduce the original issue, but this is the correct way of organizing the files and it loads correctly after clearing the next.js cache. approved.

@JadeCara JadeCara enabled auto-merge May 5, 2026 15:12
@JadeCara JadeCara added this pull request to the merge queue May 5, 2026
Merged via the queue into main with commit 9ba9ea1 May 5, 2026
49 of 51 checks passed
@JadeCara JadeCara deleted the fix/integration-detail-route branch May 5, 2026 15:22
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.

2 participants