Add per-split rest length and hands-free auto-advance flow

Two per-split settings, with the global Settings values as defaults:

- restSeconds: Int? — per-split rest, used between sets and (in flow) between
  exercises; nil falls back to the global default.
- autoAdvance: Bool? — flow mode: finishing an exercise rests, then opens the
  next one hands-free, all the way through the split.

Both are optional, snapshotted onto WorkoutDocument at the start sites (no live
split link), and not schema-bumped — same degradation pattern as activityType.

A thin RunFlowView wrapper (iOS + watch) owns the on-screen log and swaps it via
.id(currentLogID) on hand-off, so the per-exercise ExerciseProgressView stays
per-logID and untouched; the between-exercise rest reuses the existing .rest
countdown as the terminal page. The mirror reuses the per-logID live channel:
the wrapper suppresses the boundary .ended teardown so it follows across
exercises, and ContentView re-keys the cover on frame.logID — no sync-bridge
changes.

Morning Wake-Up ships as a flowing 45s-work / 15s-rest routine.

New Rest & Pacing section in the split editor exposes both controls.
This commit is contained in:
2026-07-09 15:18:13 -04:00
parent 0f5f11e5e2
commit 90deb582fe
18 changed files with 468 additions and 92 deletions
@@ -1,5 +1,6 @@
{
"activityType" : 1,
"autoAdvance" : true,
"color" : "yellow",
"createdAt" : "2020-01-01T00:00:00Z",
"exercises" : [
@@ -14,77 +15,77 @@
"weight" : 0
},
{
"durationSeconds" : 0,
"durationSeconds" : 45,
"id" : "01DXF6DT0090FANSSPTBBYFG08",
"loadType" : 0,
"loadType" : 2,
"name" : "Neck Rolls",
"order" : 1,
"reps" : 5,
"reps" : 0,
"sets" : 1,
"weight" : 0
},
{
"durationSeconds" : 0,
"durationSeconds" : 45,
"id" : "01DXF6DT00GKZKMRKHQ7AARGWG",
"loadType" : 0,
"loadType" : 2,
"name" : "Arm Circles",
"order" : 2,
"reps" : 10,
"reps" : 0,
"sets" : 1,
"weight" : 0
},
{
"durationSeconds" : 0,
"durationSeconds" : 45,
"id" : "01DXF6DT00KG2640BBEXTTFNM3",
"loadType" : 0,
"loadType" : 2,
"name" : "Torso Twist",
"order" : 3,
"reps" : 10,
"reps" : 0,
"sets" : 1,
"weight" : 0
},
{
"durationSeconds" : 0,
"durationSeconds" : 45,
"id" : "01DXF6DT005JW5BTSHWY54S6P3",
"loadType" : 0,
"loadType" : 2,
"name" : "Standing Side Bend",
"order" : 4,
"reps" : 8,
"reps" : 0,
"sets" : 1,
"weight" : 0
},
{
"durationSeconds" : 0,
"durationSeconds" : 45,
"id" : "01DXF6DT004CYSBPP0KYDMJMMG",
"loadType" : 0,
"loadType" : 2,
"name" : "Hip Circles",
"order" : 5,
"reps" : 8,
"reps" : 0,
"sets" : 1,
"weight" : 0
},
{
"durationSeconds" : 0,
"durationSeconds" : 45,
"id" : "01DXF6DT00TSP140VH9JYVHS15",
"loadType" : 0,
"loadType" : 2,
"name" : "Leg Swings",
"order" : 6,
"reps" : 10,
"reps" : 0,
"sets" : 1,
"weight" : 0
},
{
"durationSeconds" : 0,
"durationSeconds" : 45,
"id" : "01DXF6DT00J0C4EADB3VRKEJB2",
"loadType" : 0,
"loadType" : 2,
"name" : "Standing Calf Raise",
"order" : 7,
"reps" : 12,
"reps" : 0,
"sets" : 1,
"weight" : 0
},
{
"durationSeconds" : 30,
"durationSeconds" : 45,
"id" : "01DXF6DT00BMMGNKB4B6TQ5E59",
"loadType" : 2,
"name" : "Standing Forward Fold",
@@ -97,6 +98,7 @@
"id" : "01DXF6DT00FJ5F1HRENQPC1DTG",
"name" : "Morning Wake-Up",
"order" : 8,
"restSeconds" : 15,
"schemaVersion" : 3,
"systemImage" : "sun.max.fill",
"updatedAt" : "2020-01-01T00:00:00Z"