chore: enrich Dashboard with meaningful content (#162) #166
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates to #162
Severity: High
Problem
The dashboard is ~60% empty white space below the Quick Actions cards. For a user with 6 vehicles and active data, the dashboard should surface more value and answer "what do I need to do today?" at a glance.
Recommendation
Add one or more of:
Acceptance Criteria
Implementation Plan (from #162 -- Milestone 11)
Phase: 4 (Dashboard improvements) | Priority: High | Depends on: None | Blocks: None
Context
The dashboard currently shows summary stat cards and vehicles needing attention, but lacks meaningful content like recent activity. The
useDashboardData()hook fetches fuel logs and maintenance data internally but only returns summary counts -- the raw data is not exposed to consumers.Implementation
1. Define new type in
frontend/src/features/dashboard/types/index.ts:2. Extend
DashboardDatainterface (same file):3. Extend
frontend/src/features/dashboard/hooks/useDashboardData.ts:Inside the
queryFn, after calculating existing data, buildrecentActivity:{ type: 'fuel', vehicleId, vehicleName, description: "Filled {gallons} gal at ${pricePerGallon}/gal", timestamp }{ type: 'maintenance', vehicleId, vehicleName, description: "{serviceType} completed", timestamp }maintenanceApi.getRecordsByVehicle()) since the hook currently only fetches schedulesrecentActivityalongside existingsummaryandvehiclesNeedingAttention4. Create
frontend/src/features/dashboard/components/RecentActivity.tsx:5. Wire into
frontend/src/features/dashboard/components/DashboardScreen.tsx:<RecentActivity>section below VehiclesNeedingAttentionrecentActivityfromuseDashboardDatahook6. Documentation -- Create
frontend/src/features/dashboard/CLAUDE.md:Files
frontend/src/features/dashboard/types/index.tsfrontend/src/features/dashboard/hooks/useDashboardData.tsfrontend/src/features/dashboard/components/RecentActivity.tsx(new)frontend/src/features/dashboard/components/DashboardScreen.tsxfrontend/src/features/dashboard/CLAUDE.md(new)Commit Convention
Test Criteria
Risk Notes
Branch
Work on branch
issue-162-ux-design-audit-cleanup(shared with all #162 sub-issues)Milestone: Implementation Complete
Phase: Execution | Agent: Developer | Status: PASS
Changes
types/index.ts:RecentActivityIteminterface (type,vehicleId,vehicleName,description,timestamp)DashboardDatawithrecentActivityfieldhooks/useDashboardData.ts:recentActivityfrom existing fuel logs (last 7 days) and upcoming maintenance (next 30 days)useRecentActivity()derived hookcomponents/RecentActivity.tsx(new):components/DashboardScreen.tsx:RecentActivitybetween VehiclesNeedingAttention and QuickActionsindex.ts:Verification
f2b20aaon branchissue-162-ux-design-audit-cleanupVerdict: PASS | Next: Visual verification on mobile and desktop viewports