Seed starter splits deterministically with immutable clone-on-edit seeds

Starter splits ship as byte-canonical SplitDocument JSON with fixed
ULIDs (Workouts/Resources/StarterSplits, regenerated by
Scripts/generate_starter_splits.swift) and auto-seed after connect into
a verifiably empty container, re-checked after a settle delay — wrong
guesses are harmless because identical bytes make same-path conflicts
empty and tombstones reap resurrected seeds. Seeds are immutable:
SyncEngine.save(split:) forks an edited seed to a fresh ULID and
soft-deletes the original, whose stub is exempt from pruning
(IndieSync 0.3.0 prune(exempting:)) and vetoes resurrection forever;
split views resolve by id through a redirect map to follow the swap.
Add Starter Splits in Settings restores deleted seeds by lifting the
veto stub and rewriting the bundle bytes.

Also fixes ingestFromWatch bypassing the tombstone veto (a phone-deleted
workout resurrected when a stale watch resent it) and reaps a live file
immediately when its tombstone arrives.

SplitDetailView also picks up the category-grouped exercise sections
from the exercise-category work.
This commit is contained in:
2026-07-06 01:16:05 -04:00
parent 7274f155e9
commit 936a585ece
16 changed files with 1088 additions and 242 deletions
+13 -4
View File
@@ -7,17 +7,26 @@ your own iCloud Drive.
## Key Features
- **Workout splits** — organize exercises into reusable routines with custom
colors, icons, and an activity type (strength, HIIT, cardio, …). Start with
built-in starter splits (Upper Body / Core / Lower Body) generated from a
bundled exercise catalog.
colors, icons, and an activity type (strength, HIIT, cardio, …). Each exercise
is tagged as **warm-up** or **main circuit**, and the split screen groups its
list accordingly. Built-in starter splits (Upper Body / Core / Lower Body
machine routines, plus an equipment-free **Bodyweight Core** circuit with its
own warm-up) appear automatically on first launch; editing one makes it your
own copy, and deleted starters can be restored from Settings.
- **Exercise library** — a bundled catalog of starter exercises (bodyweight and
machine-based) to populate your splits.
machine-based) to populate your splits, plus a growing reference library
(`Exercise Library/`) with per-exercise setup, cues, mistakes, progressions,
and a rig-animated stick-figure visual system.
- **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. End a workout early
from the **⋯** menu — **Save** keeps your progress (remaining exercises are marked
skipped) or **Discard** removes it.
- **Animated form guide** — exercises with a bundled motion (the bodyweight core
moves, e.g. Bird Dog) show a looping stick-figure demonstration on the run
screen's bottom half, rendered live from the Exercise Library's rig data with
the working limbs highlighted.
- **Progress tracking** — weight-progression charts per exercise across past
sessions.
- **Apple Watch companion** — starting a workout on the iPhone launches the watch