Skip to content

Fix/custom 404 page#605

Open
anushka11p wants to merge 2 commits into
param20h:devfrom
anushka11p:fix/custom-404-page
Open

Fix/custom 404 page#605
anushka11p wants to merge 2 commits into
param20h:devfrom
anushka11p:fix/custom-404-page

Conversation

@anushka11p

Copy link
Copy Markdown

📋 PR Checklist

Thank you for contributing to PDF-Assistant-RAG! 🎉
Please fill out this template before submitting. PRs without it filled in will be closed.


🔗 Related Issue

Closes #568


📝 What does this PR do?

Adds a custom 404 (not-found) page for the Next.js App Router frontend. Previously, navigating to an unmatched route showed a generic/unclear error response instead of a branded page.

The new page:

  • Clearly indicates the requested page doesn't exist
  • Provides navigation options: Return to Home, and Go Back (browser history)
  • Matches the existing app's styling (Tailwind + shadcn/ui Button component)

🗂️ Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔧 Refactor / code cleanup
  • 📝 Documentation update
  • 🎨 UI / styling change
  • ⚙️ CI / tooling / config change
  • 🧪 Tests

🧪 How was this tested?

  • Ran the backend locally (uvicorn app.main:app --reload)
  • Ran the frontend locally (npm run dev inside frontend/)
  • Tested the affected API endpoints manually
  • Added / updated tests

📸 Screenshots (if UI change)

Screenshot 2026-06-14 at 1 32 32 PM

⚠️ Anything to flag for reviewers?

  • The Button component in this project (@base-ui/react/button-based) doesn't support an asChild prop, so the navigation links use <Link><Button>...</Button></Link> composition instead.
  • A pre-existing console warning from ThemeProvider/next-themes ("Encountered a script tag while rendering React component") appears on this route too — verified via git stash that it exists independently of this change, so it's out of scope here.

✅ Self-Review Checklist

  • My branch is based on dev, not main
  • I have not added any secrets / API keys
  • I have not modified main branch or any HuggingFace deployment config
  • My code follows the existing style (no unnecessary formatting changes)
  • I have updated relevant docs / comments if needed

@anushka11p anushka11p requested a review from param20h as a code owner June 14, 2026 08:05
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]: Custom 404 Page Missing for Invalid Routes

2 participants