docs: cleanup debug logs + document goal system enhancements
Deploy Development / deploy (push) Successful in 53s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 14s

- Removed all debug print statements from placeholder_resolver.py
- Removed debug print statements from goals.py (list_goals, update_goal)
- Updated CLAUDE.md with Phase 0a completion details:
  * Auto-population of start_date/start_value from historical data
  * Time-based tracking (behind schedule = time-deviated)
  * Hybrid goal display (with/without target_date)
  * Timeline visualization in goal lists
  * 7 bug fixes documented
- Created memory file for future sessions (feedback_goal_system.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 4.6 committed 2026-03-28 17:32:13 +01:00
1 parent dd395180a3
commit 255d1d61c5
3 files changed
+39 -54

No files matched your search

+39 -1
View File
@@ -82,7 +82,45 @@ frontend/src/
**Branch:** develop
**Nächster Schritt:** Testing → Prod Deploy → Code Splitting → Phase 0b (120+ Platzhalter)
### Letzte Updates (27.03.2026 - Dynamic Focus Areas v2.0 Complete) 🆕
### Updates (28.03.2026 - Goal System Enhancement Complete) 🆕
#### Auto-Population & Time-Based Tracking ✅
- ✅ **Auto-Population von start_date/start_value:**
- Automatische Ermittlung aus erster historischer Messung (on/after Startdatum)
- Windowing-Logik: Findet nächste verfügbare Messung am oder nach gewähltem Datum
- Auto-Adjustment: Startdatum wird auf tatsächliches Messdatum gesetzt
- Funktioniert für alle Goal-Typen (weight, body_fat, lean_mass, vo2max, strength, bp, rhr)
- ✅ **Time-Based Tracking (Behind Schedule):**
- Linear Progress Model: expected = (elapsed_days / total_days) × 100
- Deviation Calculation: actual_progress - expected_progress
- Negativ = behind schedule, Positiv = ahead of schedule
- User-Feedback: "Warum 'behind schedule'?" → Zeitbasierte Abweichung implementiert
- ✅ **Hybrid Goal Display:**
- Goals MIT target_date: Zeit-basierte Abweichung (±% voraus/zurück)
- Goals OHNE target_date: Einfacher Fortschritt (% erreicht)
- Kombinierte Sortierung für aussagekräftige Rankings
- Platzhalter: `{{top_3_goals_behind_schedule}}`, `{{top_3_goals_on_track}}`
- ✅ **Timeline Visualization:**
- Start → Ziel Datumsanzeige in Ziellisten
- Format: "Start: 92.0 kg (22.02.26) → Ziel: 85.0 kg (31.05.26)"
- Fortschrittsbalken mit Prozentanzeige
#### Bug Fixes (28.03.2026) ✅
- ✅ **PostgreSQL Date Arithmetic:** ORDER BY ABS(date - %s::date) statt EXTRACT(EPOCH)
- ✅ **JSON Date Serialization:** serialize_dates() für Python date → ISO strings
- ✅ **start_date nicht gespeichert:** update_goal() Logik komplett überarbeitet
- ✅ **start_date fehlte in SELECT:** get_active_goals() + get_goals_grouped() ergänzt
- ✅ **Edit-Form Datum-Fallback:** goal.start_date || '' statt || today
- ✅ **Behind Schedule Logik:** Von "lowest progress" zu "time-based deviation"
- ✅ **Fehlende created_at:** Backup-Datum für Goals ohne start_date
#### Betroffene Dateien:
- `backend/routers/goals.py`: serialize_dates(), _get_historical_value_for_goal_type(), create_goal(), update_goal(), list_goals(), get_goals_grouped()
- `backend/goal_utils.py`: get_active_goals() SELECT ergänzt (start_date, created_at)
- `backend/placeholder_resolver.py`: _format_goals_behind(), _format_goals_on_track() komplett überarbeitet (hybrid logic)
- `frontend/src/pages/GoalsPage.jsx`: Timeline-Display, handleEditGoal() fix
### Letzte Updates (27.03.2026 - Dynamic Focus Areas v2.0 Complete)
#### Dynamic Focus Areas v2.0 System ✅
- ✅ **Migration 031-032:** Vollständiges dynamisches System