improve: optimize admin dashboard statistics and user experience#24
Conversation
- Remove inaccurate Total Chunks and Indexed cards (no API available) - Keep only 4 reliable document-level statistics - Optimize grid layout from 3 to 4 columns for better balance - Improve refresh rate from 30s to 5s for better user experience - Clean up unused TrendingUp icon import
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the admin dashboard by removing inaccurate statistics and improving user experience through faster refresh rates and better layout.
- Removes Total Chunks and Indexed statistics cards that lack proper backend API support
- Improves refresh rate from 30 seconds to 5 seconds for near real-time updates
- Updates grid layout from 3 columns to 4 columns for better visual balance
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| }), | ||
| enabled: !!apiKey, | ||
| refetchInterval: 30000, // Refetch every 30 seconds | ||
| refetchInterval: 5000, // Refetch every 5 seconds |
There was a problem hiding this comment.
A 5-second refresh interval may cause excessive API calls and unnecessary load on the backend. Consider if 5 seconds is truly necessary for this use case, or if a slightly longer interval (e.g., 10-15 seconds) would provide sufficient real-time updates while reducing server load.
| refetchInterval: 5000, // Refetch every 5 seconds | |
| refetchInterval: 10000, // Refetch every 10 seconds |
| Clock, | ||
| TrendingUp, | ||
| Server, | ||
| Search |
There was a problem hiding this comment.
The 'Search' import from lucide-react appears to be unused after removing the indexed chunks card. Consider removing this unused import to keep the code clean.
| Search | |
| Server |
Summary
Optimize dashboard statistics display and enhance user experience by removing inaccurate metrics and improving refresh rates.
Changes Made
Key Implementation Notes
getDocumentsendpoint for reliable statisticsStatistics Cards Overview
Technical Details
/api/v1/sourcesendpointTesting Completed