- Core principles for autonomous agents with verification
- Checkpoint-based self-monitoring patterns
- Generalized agent workflow (no project-specific agents)
- Single source of truth in ~/clawd/claude-agents-skills/
- PM autonomy and cron job configuration
- Verification protocol to prevent hallucinations
- Together with CODING-CONVENTIONS.md, foundation for agent development
- Created 04-06-PLAN.md outlining persistence improvements phases
- Phase 04-06-01: Draft persistence via localStorage
- Added useDraftWorkout hook for auto-saving/loading drafts
- Integrated hook into WorkoutEditPage
- Added draft recovery prompt UI
- Drafts cleared after successful save
- Phase 04-06-02: Save error handling & retry (scaffolding)
- Added error state and syncStatus tracking
- Added handleRetry() for failed saves
- Error banner with retry button
- Phase 04-06-03: Sync status UI (scaffolding)
- Added visual feedback for save progress
- Status indicators: saving, saved, error
- Disabled UI during save to prevent conflicts
- Created comprehensive styles for new UI components
Status: 04-06-01 complete and integrated. Ready for testing.
- Fetch custom workouts for authenticated user
- Display 'Anpassad' (custom) or 'Program' badge on each workout card
- Add badge component with orange accent for custom, muted color for program
- Badge positioned bottom-right of workout icon
- Responsive styling consistent with Gravl dark theme
- All build checks pass
- Add custom_workouts and custom_workout_exercises tables (schema)
- New endpoints:
- GET /api/exercises - List all exercises for picker
- POST /api/custom-workouts - Fork program workout
- GET /api/custom-workouts - List user's custom workouts
- GET /api/custom-workouts/:id - Get workout with exercises
- PUT /api/custom-workouts/:id - Update workout exercises
- DELETE /api/custom-workouts/:id - Delete custom workout
- Updated endpoints for source_type support:
- GET /api/logs - Filter by source_type and custom_workout_id
- POST /api/logs - Save with source_type and custom_workout_id
- DELETE /api/logs - Support custom workout log deletion
- Adds Phase 4 planning overview
Completes: 04-01-schema-migration, 04-02-backend-api
Next: 04-03-frontend-workout-edit
- Added deleteLog function in App.jsx: calls DELETE /api/logs and removes entry from local logs state
- Passed onDeleteSet={deleteLog} to WorkoutPage in workout view render
- Updated WorkoutPage function signature to accept onDeleteSet prop
- Passed onDeleteSet through to each ExerciseCard (ExerciseCard already calls it in handleDeleteSet)
- Non-logged sets (404 from backend) silently ignored via catch block
- DELETE /api/logs accepts user_id, program_exercise_id, date, set_number in request body
- Deletes matching workout_logs row by composite key
- Returns 200 + deleted id on success, 404 if row not found
- Consistent with existing POST /api/logs (no auth middleware, user_id from body)
- 02-01-SUMMARY.md: dynamic setList refactor, add-set modal, delete-set with last-set guard
- STATE.md: advance to phase 2 plan 2, record decisions, update metrics and session
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace fixed setInputs object with setList array state
- Add showAddModal state and set-type chooser modal (Vanligt set / Dropset)
- handleAddNormal: append one set pre-filled from last row's weight and reps
- handleAddDropset: append 3 sets at 100%/80%/60% weight (rounded to 2.5kg), 10 reps
- handleDeleteSet: remove by index with last-set guard (no delete when only 1 remains)
- handleComplete and handleInputChange updated to use array index (idx+1 as set_number)
- Progress badge and all-done class use setList.length instead of exercise.sets
- onDeleteSet prop added (optional stub for backend wiring in plan 02)
- Add trash icon SVG to Icons.jsx (outline trash can, consistent with icon library)
- Import WeightInput and RepsInput in WorkoutPage.jsx
- Replace bare <input type="number"> elements with stepper components
- Update .set-inputs alignment to flex-start for taller steppers
- Update .set-row alignment to flex-start
- Remove now-redundant .weight-input and .reps-input CSS rules (main + mobile)
- 01-03-SUMMARY.md: audit confirmed all 44px targets already in place from 01-01
- STATE.md: advanced to plan 3/3, updated metrics and decisions
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comprehensive research on implementing Phase 1: Input UX for fitness app.
Documents standard stack (React 18 + CSS custom properties), architecture
patterns (stepper components with 44px touch targets, validation), common
pitfalls (iOS auto-zoom, negative values), and verified code examples.
Key findings:
- Mobile touch target minimum 44px (iOS HIG, Material Design, WCAG 2.1)
- iOS auto-zoom prevented with font-size >= 16px on inputs
- Negative value validation in onChange handlers (not just HTML min attr)
- Custom stepper buttons recommended over native browser spinners
- Plain React state sufficient for Phase 1 (no form libraries needed)
- Weight input: 2.5kg steps; Reps input: 1 rep steps
- Includes reusable StepperInput component, WeightInput, RepsInput
All patterns verified against official docs (MDN, Apple HIG, Material Design,
WCAG 2.1) and industry best practices (NN/G, Chakra UI, Material Design).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Research compiled from Exa AI search covering:
- Market overview (2024-2032 projections)
- UX best practices and common mistakes
- User feedback from Reddit communities
- Competitor analysis (Strong, Hevy, FITBOD, etc.)
- Gamification strategies
- AI coaching trends
- Prioritized recommendations for Gravl