From 6916e5b8088f6966aaadddba1428dc8e7043bb98 Mon Sep 17 00:00:00 2001 From: Lars Date: Sun, 22 Mar 2026 16:51:09 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20multi-dimensional=20rest=20days=20+=20d?= =?UTF-8?q?evelopment=20routes=20architecture=20(v9d=20=E2=86=92=20v9e)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changes: **Frontend:** - Fix double icon in rest day list (removed icons from FOCUS_LABELS) - Icon now shows once with proper styling **Migration 011:** - Remove UNIQUE constraint (profile_id, date) from rest_days - Allow multiple rest day types per date - Use case: Muscle recovery + Mental rest same day **Architecture: Development Routes** New document: `.claude/docs/functional/DEVELOPMENT_ROUTES.md` 6 Independent Development Routes: - πŸ’ͺ Kraft (Strength): Muscle, power, HIIT - πŸƒ Kondition (Conditioning): Cardio, endurance, VO2max - 🧘 Mental: Stress, focus, competition readiness - 🀸 Koordination (Coordination): Balance, agility, technique - πŸ§˜β€β™‚οΈ MobilitΓ€t (Mobility): Flexibility, ROM, fascia - 🎯 Technik (Technique): Sport-specific skills Each route has: - Independent rest requirements - Independent training plans - Independent progress tracking - Independent goals & habits **Future (v9e):** - Route-based weekly planning - Multi-route conflict validation - Auto-rest on poor recovery - Route balance analysis (KI) **Future (v9g):** - Habits per route (route_habits table) - Streak tracking per route - Dashboard route-habits widget **Backlog Updated:** - v9d: Rest days βœ… (in testing) - v9e: Development Routes & Weekly Planning (new) - v9g: Habits per Route (extended) Co-Authored-By: Claude Opus 4.6 --- .../011_allow_multiple_rest_days_per_date.sql | 17 +++++++++++++++++ frontend/src/pages/RestDaysPage.jsx | 13 +++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 backend/migrations/011_allow_multiple_rest_days_per_date.sql diff --git a/backend/migrations/011_allow_multiple_rest_days_per_date.sql b/backend/migrations/011_allow_multiple_rest_days_per_date.sql new file mode 100644 index 0000000..81e269a --- /dev/null +++ b/backend/migrations/011_allow_multiple_rest_days_per_date.sql @@ -0,0 +1,17 @@ +-- Migration 011: Allow Multiple Rest Days per Date +-- v9d Phase 2a: Support for multi-dimensional rest (development routes) +-- Date: 2026-03-22 + +-- Remove UNIQUE constraint to allow multiple rest day types per date +-- Use Case: Muscle recovery + Mental rest on same day +-- Future: Development routes (Conditioning, Strength, Coordination, Mental, Mobility, Technique) + +ALTER TABLE rest_days +DROP CONSTRAINT IF EXISTS unique_rest_day_per_profile; + +-- Add index for efficient queries (profile_id, date) +CREATE INDEX IF NOT EXISTS idx_rest_days_profile_date_multi +ON rest_days(profile_id, date DESC); + +-- Comment for documentation +COMMENT ON TABLE rest_days IS 'v9d Phase 2a: Multi-dimensional rest days - multiple entries per date allowed for different development routes (muscle, cardio, mental, coordination, technique)'; diff --git a/frontend/src/pages/RestDaysPage.jsx b/frontend/src/pages/RestDaysPage.jsx index 01728ab..d8ad303 100644 --- a/frontend/src/pages/RestDaysPage.jsx +++ b/frontend/src/pages/RestDaysPage.jsx @@ -62,11 +62,11 @@ const PRESETS = [ ] const FOCUS_LABELS = { - muscle_recovery: 'πŸ’ͺ Muskelregeneration', - cardio_recovery: 'πŸƒ Cardio-Erholung', - mental_rest: '🧘 Mentale Erholung', - deload: 'πŸ“‰ Deload', - injury: '🩹 Verletzungspause', + muscle_recovery: 'Muskelregeneration', + cardio_recovery: 'Cardio-Erholung', + mental_rest: 'Mentale Erholung', + deload: 'Deload', + injury: 'Verletzungspause', } export default function RestDaysPage() { @@ -434,7 +434,8 @@ export default function RestDaysPage() { color: preset?.color || '#888', marginBottom: day.note ? 8 : 0, }}> - {preset?.icon || 'πŸ“…'} {FOCUS_LABELS[focus] || focus} + {preset?.icon || 'πŸ“…'} + {FOCUS_LABELS[focus] || focus} {/* Note */}