Restructure into a three-tab app with Progress, goals, and Meditation
The UX redesign's first landing (spec in UX-REDESIGN.md): ContentView becomes a Today / Progress / Settings TabView, "Routine" replaces "Split" in every user-facing string and view name (code-level types keep their names), and workout starting moves to shared WorkoutStarter / StartedWorkoutNavigator plumbing. - New Progress tab: weekly goal streaks, workout trends, per-exercise weight progression, achievements, and the full history list (WorkoutLogsView -> WorkoutHistoryView). - Goals: stable categories workouts roll up to, managed from Settings. - New Meditation exercise + starter routine; timed sits record to Apple Health as Mind & Body sessions. Claude-Session: https://claude.ai/code/session_012qw2itfzKyEJ1HpsFt8Ex4
This commit is contained in:
@@ -6,14 +6,16 @@ import SwiftData
|
||||
/// safe; `SyncEngine` repopulates it from the container on next launch.
|
||||
enum WorkoutsModelContainer {
|
||||
/// Bump whenever the cache schema changes — wipes and rebuilds from files.
|
||||
/// 2: added health-metric columns to `Workout` and `activityTypeRaw` to `Split`.
|
||||
/// 2: added health-metric columns to `Workout` and `activityTypeRaw` to `Routine`.
|
||||
/// 3: added `categoryRaw` to `Exercise`.
|
||||
/// 4: removed the weight-reminder columns and `categoryRaw` from `Exercise` and
|
||||
/// the `completed` column from `WorkoutLog`; added `machineSettings` to both.
|
||||
/// 5: `weight` went Int → Double on `Exercise` and `WorkoutLog`; added
|
||||
/// `setEntries` and `logUpdatedAt` to `WorkoutLog`.
|
||||
/// 6: added `deletedLogIDs` to `Workout` (per-log merge deletion tombstones).
|
||||
static let currentSchemaVersion = 6
|
||||
/// 7: renamed `Split` entity to `Routine`.
|
||||
/// 8: added `Schedule` cache entity.
|
||||
static let currentSchemaVersion = 8
|
||||
private static let schemaVersionKey = "Workouts.persistenceSchemaVersion"
|
||||
private static let identityTokenKey = "Workouts.iCloudIdentityToken"
|
||||
|
||||
@@ -30,7 +32,7 @@ enum WorkoutsModelContainer {
|
||||
}
|
||||
|
||||
static func make() -> ModelContainer {
|
||||
let schema = Schema([Split.self, Exercise.self, Workout.self, WorkoutLog.self])
|
||||
let schema = Schema([Routine.self, Exercise.self, Workout.self, WorkoutLog.self, Schedule.self])
|
||||
ensureStoreDirectoryExists()
|
||||
wipeIfNeeded()
|
||||
wipeIfAccountChanged()
|
||||
|
||||
Reference in New Issue
Block a user