Create Plan from Session. Top bar rounded

This commit is contained in:
AG
2025-12-17 00:44:12 +02:00
parent 46752e0f35
commit 54cd915818
9 changed files with 313 additions and 21 deletions

View File

@@ -204,6 +204,22 @@ Comprehensive test plan for the GymFlow web application, covering authentication
- The session starts with the selected plan's exercises.
- The timer starts running.
#### 2.5a. A. Workout Plans - Create Plan from Session
**File:** `tests/plan-from-session.spec.ts`
**Steps:**
1. User completes a session with multiple sets (e.g., 2 sets of Pushups, 1 set of Squats).
2. Navigate to 'History'.
3. Click 'Create Plan' from the session menu.
4. Verify the Plan Editor opens.
5. **Verify Steps**: The plan should contain exactly 3 steps (Pushups, Pushups, Squats).
**Expected Results:**
- The Plan Editor is pre-filled.
- Plan steps mirror the session sets 1:1.
#### 2.6. B. Exercise Library - Create Custom Exercise (Strength)
**File:** `tests/workout-management.spec.ts`

View File

@@ -64,7 +64,17 @@ Users can structure their training via Plans.
* **Logic**: Supports reordering capabilities via drag-and-drop in UI.
* **3.2.2 Plan Deletion**
* Standard soft or hard delete (Cascades to PlanExercises).
* **3.2.3 AI Plan Creation**
* **3.2.3 Create Plan from Session**
* **Trigger**: Action menu in History session.
* **Logic**:
* Creates a new Plan pre-filled with data from the selected session.
* **Step Generation**: Mirrors sets 1:1. Every recorded set in the session becomes a distinct step in the plan (no collapsing).
* **Attributes**:
* `startWeight`: inherited from set.
* `restTime`: uses User's default rest timer setting.
* `isWeighted`: true if the specific set had weight > 0.
* **3.2.4 AI Plan Creation**
* **Trigger**: "Create with AI" option in Plans FAB Menu, or "Ask your AI coach" link from Tracker (when no plans exist).
* **UI Flow**:
* Opens a dedicated Side Sheet in the Plans view.