-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Implementation of "Overview" (Real Data Integration) (app/me/page.tsx)
Objective
Finalize the main dashboard by completely removing all dummy data dependencies and wiring the existing layout directly to the live user/session object. This is not a cosmetic change — it is the critical step that transforms the dashboard from a prototype into a production-ready surface. The end result should be a dashboard that loads seamlessly, reflects the user's real activity instantly, and maintains perfect visual stability from the moment the page is requested to the moment data is fully rendered. Every prop, every chart, and every stat card must be driven by real, live session data with no fallbacks to static files.
UI Description
Aesthetics & Design Cohesion
The overview page is the first authenticated surface most users will see after logging in — it sets the tone for the entire application experience. Every design decision must reflect absolute cohesion with the Boundless brand: typography, spacing, color usage, component sizing, and motion must all feel native to the design system, not bolted on. There should be no visual inconsistencies between this page and the rest of the app/me/* family. If something looks slightly off, it is not acceptable.
Performance & Loading Strategy
The most important UX constraint on this page is zero content shift and zero data pop-in. Users should never see a flash of empty content, a skeleton replaced abruptly by real data, or a layout that jumps as data loads in. Achieving this requires a coordinated, layered approach:
- Wrap the dashboard in
AuthGuardto ensure the user session is validated before any content is rendered — unauthenticated users should never reach the dashboard skeleton - Implement a full-page Skeleton UI that precisely mirrors the dimensions, spacing, and structure of the real dashboard layout — skeletons should not be generic placeholders but accurate outlines of the content they represent
- The transition from skeleton to real content should feel like a fade or dissolve, not a hard swap — use Framer Motion's layout animations or opacity transitions to make the handoff imperceptible
- Coordinate all data-dependent sections so they resolve together where possible, avoiding a cascade of individual sections popping in at different times
Activity Chart Interactions
- The activity chart must support subtle hover tooltips on each data point
- On hover, a styled popover should appear revealing detailed information for that point: the exact date, the activity count, and any other contextually relevant fields available in the session data
- The popover must be styled consistently with the Boundless design system — not a browser default tooltip or an unstyled div, but a polished, on-brand component
- The popover should appear and disappear with a smooth fade transition and must be positioned intelligently to avoid overflowing the viewport at edge data points
- Ensure the tooltip interaction is accessible — keyboard users navigating the chart should also be able to trigger and read tooltip content
Technical Details
Refactoring & Data Mapping
Remove data.json
- Completely remove all imports and references to
data.jsonfromMeDashboardand any child components it uses - There must be no static fallback data remaining anywhere in the dashboard component tree after this refactor
Session Data Mapping
- Map all props currently sourced from
data.jsonto their corresponding fields on theuser.profileobject from the session - The mapping should be explicit and type-safe — define or extend the necessary TypeScript interfaces in
lib/api/types.tsto cover every field being consumed - Strictly no
anytypes anywhere in the mapping layer
Hydration on Mount
- Trigger a
refreshUser()call on component mount to ensure the local user state is perfectly synchronized with the latest backend session before the dashboard renders its data - The
refreshUser()call should be coordinated with the loading state — the skeleton UI should remain visible until both the session hydration and therefreshUser()resolution are complete - Handle the case where
refreshUser()fails gracefully: surface an appropriate error state rather than rendering stale or empty data silently
⚠️ Caution
This is a production environment — not a sandbox.
- Code must be performant, accessible, and clean
- No dummy data —
data.jsonmust be fully removed; all props must map to the liveuser.profilesession object - AI-generated code will be scrutinized; poorly structured or "hallucinated" code will result in immediate issue closure
- Follow the existing design system: shadcn/ui, Tailwind, Framer Motion
Testing & Verification
Automated Tests
npm run lint # Ensure code quality
npm run build # Verify no breaking changes in routing or typesManual Verification
- Confirm
data.jsonis fully removed — no imports, references, or fallbacks remain anywhere in theMeDashboardcomponent tree - Verify all dashboard props are correctly mapped to
user.profilefields and display accurate live data - Confirm
refreshUser()is called on mount and that the skeleton remains visible until hydration is complete - Test
refreshUser()failure handling — confirm an appropriate error state is shown rather than a silent empty or stale render - Simulate a slow connection — verify the full-page Skeleton UI matches the real layout dimensions precisely and transitions to content with no hard swap or layout shift
- Confirm
AuthGuardcorrectly prevents unauthenticated access and does not flash any dashboard content before validation completes - Test activity chart hover tooltips — confirm the styled popover appears on hover with correct date and count data, positions correctly at viewport edges, and fades in/out smoothly
- Verify keyboard accessibility of the chart — tooltip content is reachable and readable without a mouse
- Confirm no TypeScript
anytypes are present in the data mapping layer - Verify the page is fully responsive and maintains design cohesion at all breakpoints
- Provide video evidence