|
|
b52c877367
|
feat: complete sleep module overhaul - app standard compliance
Deploy Development / deploy (push) Successful in 45s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s
Backend improvements:
- Plausibility check: phases must sum to duration (±5 min tolerance)
- Auto-calculate wake_count from awake segments in import
- Applied to both create_sleep and update_sleep endpoints
Frontend complete rewrite:
- ✅ Drag & Drop CSV import (like NutritionPage)
- ✅ Inline editing (no scroll to top, edit directly in list)
- ✅ Toast notifications (no more alerts, auto-dismiss 4s)
- ✅ Source badges (Manual/Apple Health/Garmin with colors)
- ✅ Expandable segment timeline view (JSONB sleep_segments)
- ✅ Live plausibility check (shows error if phases ≠ duration)
- ✅ Color-coded sleep phases (deep/rem/light/awake)
- ✅ Show wake_count in list view
Design improvements:
- Stats card on top (7-day avg)
- Import drag zone with visual feedback
- Clean inline edit mode with validation
- Timeline view with phase colors
- Responsive button layout
Confirmed: Kernschlaf (Apple Health) = Leichtschlaf (light_minutes) ✓
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-22 13:09:34 +01:00 |
|