Implement MiniCalendar dashboard widget (P2.14)
Complete the MiniCalendar component with: - Full calendar grid showing all days of the month - Phase colors applied to each day - Today highlighting with ring indicator - Navigation buttons (prev/next month, Today) - Compact phase legend - Integration into dashboard page (shows when lastPeriodDate exists) Adds 23 new tests for the MiniCalendar component covering: - Calendar grid rendering - Phase color application - Navigation functionality - Cycle rollover handling - Custom year/month props Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ This file is maintained by Ralph. Run `./ralph-sandbox.sh plan 3` to generate ta
|
||||
|
||||
## Current State Summary
|
||||
|
||||
### Overall Status: 586 tests passing across 33 test files
|
||||
### Overall Status: 609 tests passing across 34 test files
|
||||
|
||||
### Library Implementation
|
||||
| File | Status | Gap Analysis |
|
||||
@@ -71,7 +71,7 @@ This file is maintained by Ralph. Run `./ralph-sandbox.sh plan 3` to generate ta
|
||||
| `NutritionPanel` | **COMPLETE** | Shows seeds, carbs, keto guidance |
|
||||
| `OverrideToggles` | **COMPLETE** | Toggle buttons with callbacks |
|
||||
| `DayCell` | **COMPLETE** | Phase-colored day with click handler |
|
||||
| `MiniCalendar` | **PARTIAL (~30%)** | Has header with cycle info only, **MISSING: calendar grid with DayCell integration** |
|
||||
| `MiniCalendar` | **COMPLETE** | Compact calendar widget with phase colors, navigation, legend (23 tests) |
|
||||
| `MonthView` | **COMPLETE** | Calendar grid with DayCell integration, navigation controls, phase legend |
|
||||
|
||||
### Test Coverage
|
||||
@@ -114,7 +114,7 @@ This file is maintained by Ralph. Run `./ralph-sandbox.sh plan 3` to generate ta
|
||||
| `src/components/dashboard/data-panel.test.tsx` | **MISSING** - Needs tests for biometrics display |
|
||||
| `src/components/dashboard/nutrition-panel.test.tsx` | **MISSING** - Needs tests for nutrition guidance display |
|
||||
| `src/components/dashboard/override-toggles.test.tsx` | **MISSING** - Needs tests for toggle state and callbacks |
|
||||
| `src/components/dashboard/mini-calendar.test.tsx` | **MISSING** - Needs tests for header/partial implementation |
|
||||
| `src/components/dashboard/mini-calendar.test.tsx` | **EXISTS** - 23 tests (calendar grid, phase colors, navigation, legend) |
|
||||
| `src/components/calendar/day-cell.test.tsx` | **MISSING** - Needs tests for phase coloring, click handler |
|
||||
| E2E tests | **AUTHORIZED SKIP** - Per specs/testing.md |
|
||||
|
||||
@@ -462,20 +462,21 @@ Full feature set for production use.
|
||||
- **Why:** Users want detailed training guidance
|
||||
- **Depends On:** P0.4, P1.3
|
||||
|
||||
### P2.14: Mini Calendar Component
|
||||
- [ ] Dashboard overview calendar
|
||||
- **Current State:** Component exists with header/cycle info only (~30% complete), NO calendar grid
|
||||
### P2.14: Mini Calendar Component ✅ COMPLETE
|
||||
- [x] Dashboard overview calendar
|
||||
- **Current State:** COMPLETE - Compact calendar grid with phase colors, navigation buttons, today highlighting, phase legend
|
||||
- **Files:**
|
||||
- `src/components/dashboard/mini-calendar.tsx` - **Needs: complete calendar grid with phase colors using DayCell**
|
||||
- `src/components/dashboard/mini-calendar.tsx` - Complete calendar grid with DayCell integration
|
||||
- **Tests:**
|
||||
- `src/components/dashboard/mini-calendar.test.tsx` - Component test: renders current month, highlights today
|
||||
- **Features Needed:**
|
||||
- Calendar grid (reuse DayCell component from MonthView)
|
||||
- `src/components/dashboard/mini-calendar.test.tsx` - 23 tests (calendar grid, phase colors, navigation, legend)
|
||||
- **Features Implemented:**
|
||||
- Calendar grid using DayCell component
|
||||
- Current week/month view
|
||||
- Phase color coding
|
||||
- Today highlight
|
||||
- Navigation buttons (prev/next month)
|
||||
- Phase legend
|
||||
- **Why:** Quick visual reference on dashboard
|
||||
- **Note:** Can leverage existing MonthView/DayCell components for implementation
|
||||
|
||||
### P2.15: Health Check Endpoint ✅ COMPLETE
|
||||
- [x] GET /api/health for deployment monitoring
|
||||
@@ -665,19 +666,17 @@ Testing, error handling, and refinements.
|
||||
|
||||
### P3.11: Missing Component Tests
|
||||
- [ ] Add unit tests for untested components
|
||||
- **Components Needing Tests (6 total):**
|
||||
- **Components Needing Tests (5 total):**
|
||||
- `src/components/dashboard/decision-card.tsx` - Tests for rendering decision status, icon, and reason
|
||||
- `src/components/dashboard/data-panel.tsx` - Tests for biometrics display (BB, HRV, intensity)
|
||||
- `src/components/dashboard/nutrition-panel.tsx` - Tests for seeds, carbs, keto guidance display
|
||||
- `src/components/dashboard/override-toggles.tsx` - Tests for toggle states and callbacks (has interactive state)
|
||||
- `src/components/dashboard/mini-calendar.tsx` - Tests for header rendering (partial implementation)
|
||||
- `src/components/calendar/day-cell.tsx` - Tests for phase coloring and click handler
|
||||
- **Test Files to Create:**
|
||||
- `src/components/dashboard/decision-card.test.tsx`
|
||||
- `src/components/dashboard/data-panel.test.tsx`
|
||||
- `src/components/dashboard/nutrition-panel.test.tsx`
|
||||
- `src/components/dashboard/override-toggles.test.tsx`
|
||||
- `src/components/dashboard/mini-calendar.test.tsx`
|
||||
- `src/components/calendar/day-cell.test.tsx`
|
||||
- **Why:** Component isolation ensures UI correctness and prevents regressions
|
||||
|
||||
@@ -797,9 +796,8 @@ P4.* UX Polish ────────> After core functionality complete
|
||||
| Priority | Task | Effort | Notes |
|
||||
|----------|------|--------|-------|
|
||||
| Medium | P2.13 Plan Page | Medium | Placeholder exists, needs content |
|
||||
| Medium | P2.14 MiniCalendar | Small | Can reuse DayCell, ~70% remaining |
|
||||
| Medium | P2.18 OIDC Auth | Large | Production auth requirement |
|
||||
| Medium | P3.11 Component Tests | Medium | 6 components need tests |
|
||||
| Medium | P3.11 Component Tests | Medium | 5 components need tests |
|
||||
| Low | P3.7 Error Handling | Small | Polish |
|
||||
| Low | P3.8 Loading States | Small | Polish |
|
||||
| Low | P4.* UX Polish | Various | After core complete |
|
||||
@@ -841,6 +839,7 @@ P4.* UX Polish ────────> After core functionality complete
|
||||
- [x] **OverrideToggles** - Toggle buttons for flare/stress/sleep/pms
|
||||
- [x] **DayCell** - Phase-colored calendar day cell with click handler
|
||||
- [x] **MonthView** - Calendar grid with DayCell integration, navigation controls (prev/next month, Today button), phase legend, 21 tests
|
||||
- [x] **MiniCalendar** - Compact calendar widget with phase colors, navigation, legend, 23 tests (P2.14)
|
||||
|
||||
### API Routes (17 complete)
|
||||
- [x] **GET /api/user** - Returns authenticated user profile, 4 tests (P0.4)
|
||||
@@ -912,4 +911,4 @@ P4.* UX Polish ────────> After core functionality complete
|
||||
13. **OIDC vs Email/Password:** Current email/password login (P1.6) works for development. P2.18 upgrades to OIDC for production security per specs/authentication.md
|
||||
14. **E2E Tests:** Authorized skip per specs/testing.md - unit and integration tests are sufficient for MVP
|
||||
15. **Dark Mode:** Partial Tailwind support exists via dark: classes but may need prefers-color-scheme configuration in tailwind.config.js (see P4.3)
|
||||
16. **Component Tests:** 6 components lack unit tests (P3.11) - DecisionCard, DataPanel, NutritionPanel, OverrideToggles, MiniCalendar, DayCell
|
||||
16. **Component Tests:** 5 components lack unit tests (P3.11) - DecisionCard, DataPanel, NutritionPanel, OverrideToggles, DayCell
|
||||
|
||||
Reference in New Issue
Block a user