Enhance Dashboard UX with Skeletons, Empty States, and Backend Dependency Alignmen
closes #269
Description
This PR significantly enhances the Dashboard user experience by moving away from static "Coming Soon" text to a dynamic, professional interface. The focus was on improving the "perceived performance" of the app—ensuring that even while data is loading or missing, the interface remains polished and guided.
Beyond the UI, I have also synchronized the backend requirements to ensure a smooth "one-click" setup for future contributors, resolving common dependency issues found in the local development environment.
Changes Made
- Frontend (UX/UI Refinement):
- Integrated Skeleton Loading: Added custom pulsing placeholders for dashboard metrics and charts. This eliminates jarring layout shifts while waiting for backend responses.
- New Empty State Architecture: Created a reusable EmptyState component with context-aware Lucide icons to replace blank screens on tabs like "Analytics" and "Sponsorships."
- Theme Consistency: Updated Tailwind styles in the DashboardPage to ensure full accessibility and visual parity between light and dark modes.
- Component Modularization: Added Skeleton.tsx and EmptyState.tsx to the UI kit for future use across the application.
- Backend (Stability & Setup):
- Requirement Alignment: Updated requirements.txt to include essential missing libraries: sqlalchemy, aiopg, and uvicorn.
- Environment Fix: Resolved ModuleNotFoundError issues that previously blocked the FastAPI server from initializing correctly on Windows environments.
Checklist
- I have read the contributing guidelines.
- I have verified the frontend UI transitions locally.
- I have added necessary documentation (new components are modular and commented).
- All backend dependencies are now correctly listed in requirements.txt.
Summary by CodeRabbit
-
New Features
- Added Skeleton loading placeholders and an Empty State component; dashboard shows loading skeletons and empty-state prompts with actions.
- AI-driven content sections now render skeletons while loading.
-
Backend / Auth
- Login response now includes additional user and session fields.
- Email validation for new users tightened.
-
UI/UX Improvements
- Updated dashboard header, navigation, top action button, tabs and layout for clearer flow and improved loading transitions.
✏️ Tip: You can customize this high-level summary in your review settings.
Adds a new backend 🎯 3 (Moderate) | ⏱️ ~20 minutes 🐰 ✏️ Tip: You can configure your own custom pre-merge checks in the settings.📝 Walkthrough
Walkthrough
LoginResponse schema and stricter email validation, introduces two frontend UI components (EmptyState, Skeleton), and integrates loading/empty-state handling and client-side data fetching into DashboardPage with updated header actions and navigation.Changes
Cohort / File(s)
Summary
Backend Schema Updates
Backend/app/schemas/schema.pyAdded
LoginResponse Pydantic model (message, user_id, email: EmailStr, optional name, role, session, onboarding_completed) and changed UserCreate.email from str to EmailStr. Added imports: EmailStr, Any, List.
Frontend UI Components
Frontend/src/components/ui/EmptyState.tsx, Frontend/src/components/ui/Skeleton.tsxNew
EmptyState component (icon, title, description, optional CTA and handler). New Skeleton component with circle/rect variants and pulse animation for loading placeholders.
Dashboard Integration
Frontend/src/pages/DashboardPage.tsxAdded
isLoading state and useEffect data fetch flow; integrated Skeleton and EmptyState across Overview, Sponsorships, Analytics, and Collaborations areas; updated header icons/actions, navigation via useNavigate, and dark-mode-aware styling.Sequence Diagram(s)
sequenceDiagram
participant Browser as Browser (DashboardPage)
participant UI as UI Components (Skeleton / EmptyState)
participant API as Backend API
Browser->>API: Request dashboard data (on mount)
API-->>Browser: Returns data or empty result
alt while fetching
Browser->>UI: Render Skeleton placeholders
else data received
Browser->>UI: Render populated metric cards / lists
else no data
Browser->>UI: Render EmptyState with CTA
end
Estimated code review effort
Poem
I hopped through schemas, fine and neat,
Gave emails a stricter beat,
Skeletons shimmer, EmptyStates sing,
Dashboard wakes—new life they bring,
Carrots, clicks, and tiny feet.🚥 Pre-merge checks | ✅ 2 | ❌ 3
❌ Failed checks (1 warning, 2 inconclusive)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check
❓ Inconclusive
The title refers to the main change (Dashboard UX enhancement with Skeletons and Empty States) but contains a typo ('Alignmen' instead of 'Alignment') and is slightly incomplete, making it ambiguous about backend dependencies.
Correct the typo to 'Alignment' and clarify whether backend dependencies are a primary focus or secondary: revise to 'Enhance Dashboard UX with Skeletons, Empty States, and Backend Alignment'.
Out of Scope Changes check
❓ Inconclusive
Backend changes (requirements.txt updates for sqlalchemy, aiopg, uvicorn) appear tangential to the UX-focused issue #269 and lack linked justification, raising questions about scope alignment.
Clarify whether backend dependency updates are necessary for PR #270 scope or should be separated into a dedicated PR; link to any related backend initialization issues if applicable.
✅ Passed checks (2 passed)
Check name
Status
Explanation
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check
✅ Passed
The PR successfully implements the core requirements from issue #269: Skeleton Loader System with CSS-based pulsing, reusable EmptyState component with icon and CTA button, and integration into Dashboard tabs.
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Hi Maintainers, Just a gentle follow-up on this PR. All checks are passing, please let me know if any changes are needed from my side. Thanks! @Saahi30 , @Aditya30ag , @chandansgowda
@Kalpana-chavhan please do the coderabbit ai suggestion fix
hello, @Aditya30ag ,the checks are passing.