Skip to content

Add 404 pages #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add 404 pages #197

wants to merge 6 commits into from

Conversation

andreaskienle
Copy link
Contributor

@andreaskienle andreaskienle commented Jul 22, 2025

Fixes openmcp-project/backlog#164

This PR makes the following changes to user experience:

@andreaskienle andreaskienle requested a review from Copilot July 22, 2025 10:30
Copilot

This comment was marked as outdated.

@andreaskienle andreaskienle requested a review from Copilot July 22, 2025 10:37
Copilot

This comment was marked as outdated.

@andreaskienle andreaskienle requested a review from Copilot July 22, 2025 10:41
Copilot

This comment was marked as outdated.

@andreaskienle andreaskienle marked this pull request as draft July 22, 2025 10:52
@andreaskienle andreaskienle marked this pull request as ready for review July 22, 2025 12:24
@openmcp-project openmcp-project deleted a comment from Copilot AI Jul 22, 2025
@openmcp-project openmcp-project deleted a comment from Copilot AI Jul 22, 2025
@openmcp-project openmcp-project deleted a comment from Copilot AI Jul 22, 2025
@openmcp-project openmcp-project deleted a comment from Copilot AI Jul 22, 2025
@openmcp-project openmcp-project deleted a comment from Copilot AI Jul 22, 2025
@andreaskienle andreaskienle requested a review from Copilot July 23, 2025 09:25
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements proper 404 error handling by replacing the previous ControlPlaneListView with a new ProjectPage component and updating the McpPage to handle non-existing resources. The changes redirect users from invalid paths to the home page and show proper 404 messages instead of leaving users stuck on loading screens.

  • Adds 404 error detection and handling for projects and MCPs
  • Creates a reusable NotFoundBanner component for consistent error messaging
  • Implements proper loading states and error boundaries for better UX

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/views/ControlPlanes/ControlPlaneListView.tsx Completely removed - functionality moved to ProjectPage
src/spaces/onboarding/pages/ProjectPage.tsx New page component with proper error handling for projects
src/spaces/mcp/pages/McpPage.tsx Enhanced with 404 detection and loading states
src/lib/api/types/crate/listWorkspaces.ts Made projectName parameter optional
src/lib/api/types/crate/controlPlanes.ts Made parameters optional for better error handling
src/lib/api/error.ts Added utility function to detect 404/403 errors
src/components/Ui/NotFoundBanner/NotFoundBanner.tsx New reusable 404 banner component
src/components/Ui/IllustratedBanner/IllustratedBanner.tsx Enhanced to support React nodes as subtitles
src/components/ControlPlanes/List/ControlPlaneListAllWorkspaces.tsx Refactored to accept workspaces as props
src/AppRouter.tsx Updated routes and added catch-all redirect

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] Show 404 Not found page on Broken Links
1 participant