Skip to content

fix(frontend): add 404 fallback route for unknown paths#6373

Merged
Hundao merged 1 commit into
aden-hive:mainfrom
shiva9198:fix/6336-add-404-route
Mar 26, 2026
Merged

fix(frontend): add 404 fallback route for unknown paths#6373
Hundao merged 1 commit into
aden-hive:mainfrom
shiva9198:fix/6336-add-404-route

Conversation

@shiva9198

@shiva9198 shiva9198 commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

Fixes #6336

Changes Made

  • Added wildcard route (path="*") in core/frontend/src/App.tsx
  • Added new core/frontend/src/pages/not-found.tsx
  • Rendered user-friendly 404 UI with “Back to Home” link

Testing

Describe the tests you ran to verify your changes:

  • Unit tests pass (cd core && pytest tests/)
  • Lint passes (cd core && ruff check .)
  • Manual testing performed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

  • Added screenshot(s) showing invalid route now renders 404 page instead of blank screen.

Copilot AI review requested due to automatic review settings March 14, 2026 04:29
@github-actions

Copy link
Copy Markdown

PR Requirements Warning

This PR does not meet the contribution requirements.
If the issue is not fixed within ~24 hours, it may be automatically closed.

Missing: No linked issue found.

To fix:

  1. Create or find an existing issue for this work
  2. Assign yourself to the issue
  3. Re-open this PR and add Fixes #123 in the description

Exception: To bypass this requirement, you can:

  • Add the micro-fix label or include micro-fix in your PR title for trivial fixes
  • Add the documentation label or include doc/docs in your PR title for documentation changes

Micro-fix requirements (must meet ALL):

Qualifies Disqualifies
< 20 lines changed Any functional bug fix
Typos & Documentation & Linting Refactoring for "clean code"
No logic/API/DB changes New features (even tiny ones)

Why is this required? See #472 for details.

@github-actions github-actions Bot added the pr-requirements-warning PR doesn't follow contribution guidelines. Please fix or it will be auto-closed. label Mar 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 NotFound page component.
  • Registered a catch-all (*) route in App.tsx to 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.
Comment on lines +5 to +10
<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>
@shiva9198

Copy link
Copy Markdown
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

@shiva9198
shiva9198 marked this pull request as draft March 14, 2026 04:36
@shiva9198 shiva9198 closed this Mar 14, 2026
@Hundao Hundao reopened this Mar 26, 2026
@github-actions github-actions Bot removed pr-requirements-warning PR doesn't follow contribution guidelines. Please fix or it will be auto-closed. labels Mar 26, 2026
@Hundao
Hundao marked this pull request as ready for review March 26, 2026 10:09
@Hundao
Hundao force-pushed the fix/6336-add-404-route branch from 03dc799 to 5083113 Compare March 26, 2026 10:18
@Hundao
Hundao merged commit c5ac29c into aden-hive:main Mar 26, 2026
13 of 18 checks passed
@shiva9198
shiva9198 deleted the fix/6336-add-404-route branch March 26, 2026 15:38
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.

[Bug]: No 404 page — invalid routes show blank screen

3 participants