Skip to content

feat: add catch-all 404 NotFound route - #28

Merged
priscaenoch merged 1 commit into
octraban:mainfrom
IfyJustin91:fix/issue-19-not-found-404-route
Jul 20, 2026
Merged

feat: add catch-all 404 NotFound route#28
priscaenoch merged 1 commit into
octraban:mainfrom
IfyJustin91:fix/issue-19-not-found-404-route

Conversation

@IfyJustin91

Copy link
Copy Markdown
Contributor

Summary

Implements issue #19 — adds a catch-all path="*" route so any unknown URL renders a proper 404 page instead of a blank area.

Changes

  • src/pages/NotFound.tsx (new) — 404 page with:
    • Large 404 status indicator
    • "Page not found" heading
    • The unrecognised path displayed in a code block
    • Quick-nav links back to Home, Search, Graph, XDR Inspector, and Sandbox
    • A "← Go back" button
  • src/App.tsx — lazy-imports NotFound and registers <Route path="*" element={<NotFound />} /> as the last route, inside the existing ErrorBoundary/Suspense layout
  • test/NotFound.test.tsx (new) — 8 tests covering:
    • Unknown path renders the 404 content
    • Unrecognised path is shown in the message
    • "Page not found" heading is present
    • At least one working link back to /
    • All five quick-nav links rendered
    • Go-back button rendered
    • Known route /search is not swallowed by the catch-all
    • Root path / is not swallowed by the catch-all

Testing

npm test

All 8 new tests pass. TypeScript compiles clean (tsc --noEmit).

Closes #19

- Add src/pages/NotFound.tsx with clear 404 message, the
  unrecognised path, quick-nav links back to main sections,
  and a go-back button
- Register <Route path="*" element={<NotFound />}> as the
  last route in App.tsx inside the existing ErrorBoundary/
  Suspense layout
- Add test/NotFound.test.tsx with 8 tests covering unknown
  path rendering and known routes being unaffected

Closes octraban#19
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

@IfyJustin91 is attempting to deploy a commit to the Prisca's projects Team on Vercel.

A member of the Team first needs to authorize it.

@priscaenoch
priscaenoch merged commit 044dbe6 into octraban:main Jul 20, 2026
1 of 2 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Jul 20, 2026
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.

Add a catch-all 404 route

2 participants