Add an "End Workout" flow for partially-done workouts

Replace the in-workout "+" toolbar button with an ellipsis menu offering
"Add Exercise" and "End Workout". Ending opens a Save/Discard action sheet:
Save marks the remaining exercises as skipped and resolves the workout to
completed (stamping end), which drops it off the watch's active list and ends
the watch's HealthKit session; Discard soft-deletes it.

Teach the status-from-logs derivation that a skipped log is terminal, and
consolidate the three duplicated copies into a single shared
WorkoutDocument.recomputeStatusFromLogs() so an ended workout stays finished
regardless of which screen the next edit comes from.

Claude-Session: https://claude.ai/code/session_01SCv7zvGFcKy47KSTnTLxRe
This commit is contained in:
2026-06-22 18:34:14 -04:00
parent 208fa73f3d
commit e2295aa287
6 changed files with 87 additions and 49 deletions
+3 -1
View File
@@ -14,7 +14,9 @@ your own iCloud Drive.
- **Run a workout** — start a session from a split, then tap an exercise to run it
as a paged flow: a **Ready?** lead-in, count-up work phases, count-down rests, and
a **Finish** page — mirroring the Apple Watch. Swipe a row to mark it complete, or
swipe to edit its plan (sets/reps/weight or duration) and notes.
swipe to edit its plan (sets/reps/weight or duration) and notes. End a workout early
from the **⋯** menu — **Save** keeps your progress (remaining exercises are marked
skipped) or **Discard** removes it.
- **Progress tracking** — weight-progression charts per exercise across past
sessions.
- **Apple Watch companion** — starting a workout on the iPhone launches the watch