68 lines
2.4 KiB
Markdown
68 lines
2.4 KiB
Markdown
# Gravl PM - Active Task Queue
|
|
|
|
## Current: 04-03 Frontend - Workout Edit Mode
|
|
**Status:** IN PROGRESS (recovery from interruption)
|
|
**Agent:** Frontend (Claude Code)
|
|
**Directory:** /workspace/gravl/frontend
|
|
|
|
### Tasks
|
|
|
|
#### 1. Add "Edit Workout" Button
|
|
- Add edit button/icon on WorkoutSelectPage for program workouts
|
|
- Only show for workouts that are part of a program
|
|
- Button triggers edit mode/modal
|
|
|
|
#### 2. Create ExercisePicker Modal/Component
|
|
- Modal for selecting exercises from the database
|
|
- Search/filter functionality
|
|
- Exercise list with categories
|
|
- Select exercise with click/tap
|
|
- Reuse existing exercise data from current workout flow
|
|
|
|
#### 3. Implement Swap Exercise Flow
|
|
- On exercise row in edit mode, show swap button
|
|
- Open ExercisePicker modal
|
|
- Replace selected exercise in workout structure
|
|
- Maintain set/rep info where applicable
|
|
|
|
#### 4. Implement Add Exercise Flow
|
|
- "Add Exercise" button at bottom of workout
|
|
- Open ExercisePicker modal
|
|
- Append new exercise to workout with default sets/reps
|
|
- Allow configuring sets/reps for new exercise
|
|
|
|
#### 5. Fork Confirmation Dialog
|
|
- When user first modifies a program workout
|
|
- Explain: "This creates your personal version of this workout"
|
|
- Options: "Cancel", "Create My Version"
|
|
- Show only once per workout (set flag)
|
|
|
|
#### 6. Save Custom Workout
|
|
- POST to /api/custom-workouts on first modification (creates fork)
|
|
- PUT to /api/custom-workouts/:id on subsequent changes
|
|
- Update local state to use custom_workout_id
|
|
- Mark workout as "custom" in UI
|
|
|
|
### API Endpoints Available (from 04-02)
|
|
- POST /api/custom-workouts - Create custom workout from program
|
|
- PUT /api/custom-workouts/:id - Update exercises
|
|
- GET /api/custom-workouts/:id - Fetch with exercises
|
|
- GET /api/custom-workouts - List user's custom workouts
|
|
|
|
### Database Schema (from 04-01)
|
|
- custom_workouts table with user_id, name, original_program_day_id
|
|
- custom_workout_exercises table with exercise_id, set_order, sets, reps
|
|
|
|
### Success Criteria
|
|
- [ ] "Edit Workout" button visible on program workouts
|
|
- [ ] Exercise picker modal opens and shows exercises
|
|
- [ ] Can swap an exercise (replaces in workout)
|
|
- [ ] Can add new exercise (appends to workout)
|
|
- [ ] Fork confirmation shown on first edit
|
|
- [ ] Custom workout saves to backend
|
|
- [ ] Subsequent sessions use custom workout
|
|
|
|
### Next After This
|
|
- 04-04: Visual distinction (custom vs program badges)
|
|
- 04-05: Reset to original program option
|