Skip to content

improve: optimize admin dashboard statistics and user experience#24

Merged
kAYI0019 merged 1 commit into
developfrom
feature/admin-ui-implementation
Aug 20, 2025
Merged

improve: optimize admin dashboard statistics and user experience#24
kAYI0019 merged 1 commit into
developfrom
feature/admin-ui-implementation

Conversation

@qowlgur121

Copy link
Copy Markdown
Member

Summary

Optimize dashboard statistics display and enhance user experience by removing inaccurate metrics and improving refresh rates.

Changes Made

  • Statistics Optimization: Remove inaccurate Total Chunks and Indexed cards (no backend API available)
  • Layout Improvement: Streamline to 4 accurate statistics cards with balanced grid layout
  • Performance Enhancement: Improve refresh rate from 30s to 5s for near real-time updates
  • Code Cleanup: Remove unused imports and optimize component structure

Key Implementation Notes

  • Pattern: Dashboard now displays only accurate document-level statistics
  • Testing: Verified 5-second polling works correctly with real API data
  • API Integration: Uses existing getDocuments endpoint for reliable statistics
  • Performance: Optimized grid layout (lg:grid-cols-4) for better visual balance

Statistics Cards Overview

  • Total Documents - Count of all uploaded documents
  • Completed - Successfully processed documents (with success rate)
  • Processing - Documents currently in pipeline (PENDING → INDEXING)
  • Errors - Documents that failed processing (need attention)

Technical Details

  • Refresh Rate: 30s → 5s for better status monitoring
  • Grid Layout: 3-column → 4-column for optimal card distribution
  • Data Source: Real-time statistics from /api/v1/sources endpoint
  • Removed Components: Total Chunks, Indexed cards (inaccurate without dedicated API)

Testing Completed

  • Dashboard loading performance verified
  • 5-second auto-refresh functionality confirmed
  • All 4 statistics cards show accurate real-time data
  • API error handling works correctly

- 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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

Copilot AI Aug 20, 2025

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
refetchInterval: 5000, // Refetch every 5 seconds
refetchInterval: 10000, // Refetch every 10 seconds

Copilot uses AI. Check for mistakes.
Clock,
TrendingUp,
Server,
Search

Copilot AI Aug 20, 2025

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
Search
Server

Copilot uses AI. Check for mistakes.
@kAYI0019
kAYI0019 merged commit 3fa4149 into develop Aug 20, 2025
@Yoo-SH Yoo-SH mentioned this pull request Aug 21, 2025
53 tasks
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.

3 participants