fix(frontend): add 404 fallback route for unknown paths#6373
Conversation
PR Requirements WarningThis PR does not meet the contribution requirements. Missing: No linked issue found. To fix:
Exception: To bypass this requirement, you can:
Micro-fix requirements (must meet ALL):
Why is this required? See #472 for details. |
There was a problem hiding this comment.
Pull request overview
Adds a client-side 404 fallback so unknown frontend routes render a dedicated “Not Found” page instead of leaving users on a blank / unhandled route.
Changes:
- Added a new
NotFoundpage component. - Registered a catch-all (
*) route inApp.tsxto render the 404 page for unknown paths.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| core/frontend/src/pages/not-found.tsx | Introduces the 404 UI and a link back to the home route. |
| core/frontend/src/App.tsx | Adds the wildcard route and imports the new NotFound page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <h1 className="text-5xl font-semibold text-foreground">404</h1> | ||
| <p className="mt-3 text-sm text-muted-foreground">Page not found</p> | ||
| <p className="mt-1 text-sm text-muted-foreground/80"> | ||
| The page you’re looking for doesn’t exist. |
| <div className="min-h-screen bg-background flex flex-col items-center justify-center px-6 text-center"> | ||
| <h1 className="text-5xl font-semibold text-foreground">404</h1> | ||
| <p className="mt-3 text-sm text-muted-foreground">Page not found</p> | ||
| <p className="mt-1 text-sm text-muted-foreground/80"> | ||
| The page you’re looking for doesn’t exist. | ||
| </p> |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
03dc799 to
5083113
Compare
Description
Fix invalid frontend routes showing a blank screen by adding a wildcard route and a dedicated 404 page with a safe navigation path back to home.
Type of Change
Related Issues
Fixes #6336
Changes Made
path="*") incore/frontend/src/App.tsxcore/frontend/src/pages/not-found.tsxTesting
Describe the tests you ran to verify your changes:
cd core && pytest tests/)cd core && ruff check .)Checklist
Screenshots (if applicable)