WP 9c Phase 1 #12
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "develop"
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?
Enhanced sleep_segments data structure: - start: ISO datetime (2026-03-21T22:30:00) instead of HH:MM - end: ISO datetime (2026-03-21T23:15:00) - NEW - phase: sleep phase type - duration_min: duration in minutes Benefits: - Exact timestamp for each segment (no date ambiguity) - Can reconstruct complete sleep timeline - Enables precise cycle analysis - Handles midnight crossings correctly Example: [ {"phase": "light", "start": "2026-03-21T22:30:00", "end": "2026-03-21T23:15:00", "duration_min": 45}, {"phase": "deep", "start": "2026-03-21T23:15:00", "end": "2026-03-22T00:30:00", "duration_min": 75} ] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Critical fixes: 1. Added "+ Schlaf erfassen" button back (was missing!) - Opens NewEntryForm component inline - Default: 450 min (7h 30min), quality 3 - Collapsible detail view - Live plausibility check 2. Fixed import overwriting manual entries - Problem: ON CONFLICT WHERE clause didn't prevent updates - Solution: Explicit if/else logic - If manual entry exists → skip (don't touch) - If non-manual entry exists → UPDATE - If no entry exists → INSERT - Properly counts imported vs skipped Test results: ✅ CSV import with drag & drop ✅ Inline editing ✅ Segment timeline view with colors ✅ Source badges (Manual/Apple Health) ✅ Plausibility check (backend + frontend) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Changes: 1. Added sleep entry to CaptureHub (between Activity and Guide) - Icon: 🌙 - Label: "Schlaf" - Sub: "Schlafdaten erfassen oder Apple Health importieren" - Color: #7B68EE (purple) - Route: /sleep 2. Removed sleep from main bottom navigation - Nav link removed (was 6 items → now 5 items) - Moon icon import removed (no longer used) - Route /sleep remains active (Widget + CaptureHub links work) 3. Widget link unchanged - SleepWidget.jsx still links to /sleep ✓ - Dashboard → Widget → /sleep works Result: - Consistent UX: All data entry under "Erfassen" - Clean navigation: 5 main nav items (was 6) - Sleep accessible via: Dashboard Widget or Erfassen → Schlaf Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>