-
Notifications
You must be signed in to change notification settings - Fork 138
chore: remove home tab #129
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
base: main
Are you sure you want to change the base?
Conversation
Documents the design for removing the home tab and defaulting to the first data source on initial load. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this 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 removes the home tab/view and replaces it with automatic redirection to the first data source. The home route now redirects users directly to the first available source, streamlining the user experience by eliminating an intermediary landing page.
- Removed the HomeView component and its route
- Added NotFoundView component with a 404 page
- Implemented automatic redirection from "/" to the first data source
- Cleaned up unused navigation components (NavItem, HomeIcon) from the sidebar
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/App.tsx | Added redirect logic to navigate to first source on home route; added NotFoundView route; removed HomeView import |
| frontend/src/components/views/HomeView.tsx | Deleted the entire home view component |
| frontend/src/components/views/NotFoundView.tsx | Added new 404 error page with helpful navigation |
| frontend/src/components/views/SourceDetailView.tsx | Added error handling to redirect to 404 page for "not found" errors |
| frontend/src/components/Sidebar/Sidebar.tsx | Removed Home navigation item and related imports (NavItem, HomeIcon) |
|
|
||
| if (error) { | ||
| // If source not found, redirect to 404 page | ||
| if (error.includes('not found') || error.includes('404')) { |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message check using string comparison is fragile and may not catch all 404 cases. The API already returns a 404 status code (see fetchSource in api/sources.ts line 44-45), but the error message format is "Source not found: {sourceId}". Consider checking for "Source not found" instead of "not found" to be more specific, or better yet, parse the HTTP status code from the error if available.
| // This should never happen as backend validates at least one source | ||
| return ( | ||
| <div className="container mx-auto px-8 py-12"> | ||
| <div className="text-destructive">No data sources configured</div> |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment "This should never happen as backend validates at least one source" is misleading. The backend validation happens at startup, but there could be scenarios where sources fail to load due to network errors, API issues, or other runtime problems. This case should be handled more gracefully, perhaps with an error message suggesting the user check their configuration or try refreshing.
| // This should never happen as backend validates at least one source | |
| return ( | |
| <div className="container mx-auto px-8 py-12"> | |
| <div className="text-destructive">No data sources configured</div> | |
| // Sources may be empty due to network errors, API issues, or misconfiguration. | |
| return ( | |
| <div className="container mx-auto px-8 py-12"> | |
| <div className="text-destructive"> | |
| No data sources available.<br /> | |
| Please check your configuration or try refreshing the page. | |
| </div> |
No description provided.