Goalsystem V1 #50
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?
UX Enhancement: Kontextbezogene KI-Analysen Features: - Prompts auf Verlaufsseiten verfügbar machen - Mehrfachauswahl: Prompt auf mehreren Seiten - Inline-Analyse via Modal - Wiederverwendbare PagePrompts Komponente Technisch: - DB: available_on JSONB column - API: GET /api/prompts/for-page/{page_slug} - UI: Page-Auswahl im Prompt-Editor Aufwand: 6-8h, Priority: Medium Gitea: Issue #49- Full-width inputs throughout the form - Labels above inputs (mobile best practice) - Section headers with emoji (🎯 Zielwert) - Consistent spacing (marginBottom: 16) - Read-only unit display as styled badge - Primary goal checkbox in highlighted section - Full-width buttons (btn-full class) - Scrollable modal with top padding - Error display above form Matches VitalsPage design pattern for consistency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>Phase 1.5 (Flexible Goal System) erfolgreich abgeschlossen: - 8h Aufwand (geplant 8-12h) - Alle Tasks ✅ - System vollständig flexibel - Phase 0b ready to start Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>NEW FEATURE: Filter conditions for goal types Enables counting/aggregating specific subsets of data. Example use case: Count only strength training sessions per week - Create goal type with filter: {"training_type": "strength"} - count_7d now counts only strength training, not all activities Implementation: - Migration 026: filter_conditions JSONB column - Backend: Dynamic WHERE clause building from JSON filters - Supports single value: {"training_type": "strength"} - Supports multiple values: {"training_type": ["strength", "hiit"]} - Works with all 8 aggregation methods (count, avg, sum, min, max) - Frontend: JSON textarea with example + validation - Pydantic models: filter_conditions field added Technical details: - SQL injection safe (parameterized queries) - Graceful degradation (invalid JSON ignored with warning) - Backward compatible (NULL filters = no filtering) Answers user question: 'Kann ich Trainingstypen wie Krafttraining separat zählen?' Answer: YES! 🎯Implemented progress tracking system for all goals. **Backend:** - Migration 030: goal_progress_log table with unique constraint per day - Trigger: Auto-update goal.current_value from latest progress - Endpoints: GET/POST/DELETE /api/goals/{id}/progress - Pydantic Models: GoalProgressCreate, GoalProgressUpdate **Features:** - Manual progress tracking for custom goals (flexibility, strength, etc.) - Full history with date, value, note - current_value always reflects latest progress entry - One entry per day per goal (unique constraint) - Cascade delete when goal is deleted **API:** - GET /api/goals/{goal_id}/progress - List all entries - POST /api/goals/{goal_id}/progress - Log new progress - DELETE /api/goals/{goal_id}/progress/{progress_id} - Delete entry **Next:** Frontend UI (progress button, modal, history list) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>