Machine-based exercises now carry ordered name/value comfort settings (seat height, back-rest position, ...) on both ExerciseDocument and, as a plan-time snapshot, WorkoutLogDocument — the optional array doubles as the machine flag. Editable from the exercise editor's new Machine section and from the workout row's settings sheet, whose mid-workout edits write back to the originating split (workout saved first, so seed clone-on-edit repointing can't clobber the log edit). Schema tightening rides the same rev: splits bump to v2 (weight-reminder fields and the unused exercise category removed), workouts to v3 (the derived `completed` flag removed; status is the single source). Starter seeds regenerated at v2 with unchanged ULIDs; SwiftData cache schema bumped to rebuild. SCHEMA.md documents the shapes. Claude-Session: https://claude.ai/code/session_01LEoff8bXGBS83tK1c55Mf7
1.5 KiB
1.5 KiB
TODO
Schema work pending (being designed in a separate session) — the workout exercise
list (WorkoutLogListView) has UI already waiting on these:
- Bodyweight indicator: the row hides weight when
loadType != .weight, treatingLoadType.noneas "bodyweight". Decide whether that's the durable semantic or whether exercises need an explicit.bodyweightload type / flag (e.g. weighted pull-ups would need weight and bodyweight semantics). - Machine comfort settings (iOS UI built):
machineSettings: [MachineSetting]?exists on bothExerciseDocumentandWorkoutLogDocument(plus the cache entities and mappers). The optional doubles as the machine-based flag — nil means "not a machine exercise", empty means "machine exercise, nothing recorded yet". Built on iOS: the exercise add/edit screen's Machine section (toggle + ordered reorderable/deletable settings via the sharedMachineSettingsEditor), the plan-time snapshot from exercise → log at workout start / add-exercise, and the in-workout row's Settings affordance (shown for any machine-based log) opening an editor sheet that saves to the log and writes back to the split's exercise as the durable default (following the seed clone-on-edit redirect). Remaining: watch-side display — the watch app doesn't yet surface or edit machine settings, and its own "add exercise to a running workout" path (Workouts Watch App/Views/WorkoutLogListView.swift) doesn't snapshotmachineSettingsinto the new log.