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.
Dashboard displays meaningful content below Quick Actions (no large empty white space)
Content is dynamic and reflects the user's actual data
Graceful empty/zero state when no data exists
Tested on mobile (320px, 768px) and desktop (1920px)
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:
- "Recent Activity" feed showing latest fuel logs, maintenance records, document uploads
- Upcoming maintenance reminders
- Fuel cost trends chart
## Acceptance Criteria
- Dashboard displays meaningful content below Quick Actions (no large empty white space)
- Content is dynamic and reflects the user's actual data
- Graceful empty/zero state when no data exists
- Tested on mobile (320px, 768px) and desktop (1920px)
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:
exportinterfaceRecentActivityItem{type:'fuel'|'maintenance';vehicleId: string;vehicleName: string;description: string;// e.g. "Filled 12.5 gal at $3.45/gal" or "Oil Change completed"
timestamp: string;// ISO date string
}
2. Extend DashboardData interface (same file):
exportinterfaceDashboardData{summary: DashboardSummary;vehiclesNeedingAttention: VehicleNeedingAttention[];recentActivity: RecentActivityItem[];// NEW
}
feat: add recent activity feed to dashboard (refs #166)
Test Criteria
Dashboard shows "Recent Activity" section with chronological feed
Feed items display icon, vehicle name, description, and relative timestamp
Empty state shows "No recent activity" gracefully
Loading and error states handled
Mobile + desktop layouts both work
Verify on mobile (320px, 768px) and desktop (1920px) viewports
Risk Notes
New component. Must handle loading/error/empty states.
Maintenance records may require an additional API call -- verify data availability.
Branch
Work on branch issue-162-ux-design-audit-cleanup (shared with all #162 sub-issues)
## 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`:**
```typescript
export interface RecentActivityItem {
type: 'fuel' | 'maintenance';
vehicleId: string;
vehicleName: string;
description: string; // e.g. "Filled 12.5 gal at $3.45/gal" or "Oil Change completed"
timestamp: string; // ISO date string
}
```
**2. Extend `DashboardData` interface** (same file):
```typescript
export interface DashboardData {
summary: DashboardSummary;
vehiclesNeedingAttention: VehicleNeedingAttention[];
recentActivity: RecentActivityItem[]; // NEW
}
```
**3. Extend `frontend/src/features/dashboard/hooks/useDashboardData.ts`:**
Inside the `queryFn`, after calculating existing data, build `recentActivity`:
- Map last 7 days of fuel logs to `{ type: 'fuel', vehicleId, vehicleName, description: "Filled {gallons} gal at ${pricePerGallon}/gal", timestamp }`
- Map last 30 days of maintenance records to `{ type: 'maintenance', vehicleId, vehicleName, description: "{serviceType} completed", timestamp }`
- Note: maintenance records may need an additional API call (`maintenanceApi.getRecordsByVehicle()`) since the hook currently only fetches schedules
- Sort combined list by timestamp descending, take first 7 items
- Return `recentActivity` alongside existing `summary` and `vehiclesNeedingAttention`
**4. Create `frontend/src/features/dashboard/components/RecentActivity.tsx`:**
- Render a chronological feed of recent activity items
- Each item shows: icon (fuel pump / wrench), vehicle name, description, relative timestamp
- Empty state: "No recent activity" with subtle guidance text
- Responsive: single column on mobile, wider on desktop
**5. Wire into `frontend/src/features/dashboard/components/DashboardScreen.tsx`:**
- Add `<RecentActivity>` section below VehiclesNeedingAttention
- Pass `recentActivity` from `useDashboardData` hook
**6. Documentation -- Create `frontend/src/features/dashboard/CLAUDE.md`:**
```markdown
# dashboard/
## Subdirectories
| Directory | What | When to read |
| --------- | ---- | ------------ |
| `api/` | Dashboard API client | API integration |
| `components/` | SummaryCards, QuickActions, VehicleAttention, RecentActivity | UI changes |
| `hooks/` | useDashboardData (unified fetching) | Data flow |
| `pages/` | DashboardPage (desktop), DashboardScreen (mobile) | Page layout |
| `types/` | DashboardSummary, VehicleNeedingAttention, RecentActivityItem | Type changes |
## Key Patterns
- `useDashboardData()` returns summary stats, vehicles needing attention, and recent activity in a single query
- RecentActivity combines fuel logs and maintenance records into a chronological feed
- SummaryCards show zero-state CTAs linking to relevant pages
```
### Files
- `frontend/src/features/dashboard/types/index.ts`
- `frontend/src/features/dashboard/hooks/useDashboardData.ts`
- `frontend/src/features/dashboard/components/RecentActivity.tsx` (new)
- `frontend/src/features/dashboard/components/DashboardScreen.tsx`
- `frontend/src/features/dashboard/CLAUDE.md` (new)
### Commit Convention
```
feat: add recent activity feed to dashboard (refs #166)
```
### Test Criteria
- Dashboard shows "Recent Activity" section with chronological feed
- Feed items display icon, vehicle name, description, and relative timestamp
- Empty state shows "No recent activity" gracefully
- Loading and error states handled
- Mobile + desktop layouts both work
- Verify on mobile (320px, 768px) and desktop (1920px) viewports
### Risk Notes
- New component. Must handle loading/error/empty states.
- Maintenance records may require an additional API call -- verify data availability.
### Branch
Work on branch `issue-162-ux-design-audit-cleanup` (shared with all #162 sub-issues)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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