Browse Source

Split up Startup view with substeps; add important notes

Deniz Cengiz 1 year ago
parent
commit
b823118796

+ 21 - 5
Trio.xcodeproj/project.pbxproj

@@ -575,6 +575,8 @@
 		DD5DC9F92CF3DAA900AB8703 /* RadioButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5DC9F82CF3DAA900AB8703 /* RadioButton.swift */; };
 		DD5DC9FB2CF3E1B100AB8703 /* AdjustmentsStateModel+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5DC9FA2CF3E1AA00AB8703 /* AdjustmentsStateModel+Helpers.swift */; };
 		DD68889D2C386E17006E3C44 /* NightscoutExercise.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD68889C2C386E17006E3C44 /* NightscoutExercise.swift */; };
+		DD6A4E7E2DBEBF0F008C4B26 /* StartupReturningUserStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6A4E7D2DBEBF0F008C4B26 /* StartupReturningUserStepView.swift */; };
+		DD6A4E802DBEC3EE008C4B26 /* StartupForceCloseWarningStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6A4E7F2DBEC3EE008C4B26 /* StartupForceCloseWarningStepView.swift */; };
 		DD6B7CB22C7B6F0800B75029 /* Rounding.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6B7CB12C7B6F0800B75029 /* Rounding.swift */; };
 		DD6B7CB42C7B71F700B75029 /* ForecastDisplayType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6B7CB32C7B71F700B75029 /* ForecastDisplayType.swift */; };
 		DD6D67E42C9C253500660C9B /* ColorSchemeOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6D67E32C9C253500660C9B /* ColorSchemeOption.swift */; };
@@ -660,11 +662,11 @@
 		DDF847E62C5D66490049BB3B /* AddMealPresetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF847E52C5D66490049BB3B /* AddMealPresetView.swift */; };
 		DDF847E82C5DABA30049BB3B /* WatchConfigAppleWatchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF847E72C5DABA30049BB3B /* WatchConfigAppleWatchView.swift */; };
 		DDF847EA2C5DABAC0049BB3B /* WatchConfigGarminView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF847E92C5DABAC0049BB3B /* WatchConfigGarminView.swift */; };
+		DDFF202F2DB1D14500AB8A96 /* NotificationPermissionStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFF202E2DB1D14500AB8A96 /* NotificationPermissionStepView.swift */; };
+		DDFF20312DB1D15500AB8A96 /* BluetoothPermissionStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFF20302DB1D15500AB8A96 /* BluetoothPermissionStepView.swift */; };
 		DDFF204A2DB29EF500AB8A96 /* WatchLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFF20492DB29EF500AB8A96 /* WatchLogger.swift */; };
 		DDFF204E2DB2C00B00AB8A96 /* WatchStateSnapshot.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFF204D2DB2C00B00AB8A96 /* WatchStateSnapshot.swift */; };
 		DDFF20502DB2C11900AB8A96 /* WatchStateSnapshot.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFF204F2DB2C11900AB8A96 /* WatchStateSnapshot.swift */; };
-		DDFF202F2DB1D14500AB8A96 /* NotificationPermissionStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFF202E2DB1D14500AB8A96 /* NotificationPermissionStepView.swift */; };
-		DDFF20312DB1D15500AB8A96 /* BluetoothPermissionStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFF20302DB1D15500AB8A96 /* BluetoothPermissionStepView.swift */; };
 		E00EEC0327368630002FF094 /* ServiceAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = E00EEBFD27368630002FF094 /* ServiceAssembly.swift */; };
 		E00EEC0427368630002FF094 /* SecurityAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = E00EEBFE27368630002FF094 /* SecurityAssembly.swift */; };
 		E00EEC0527368630002FF094 /* StorageAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = E00EEBFF27368630002FF094 /* StorageAssembly.swift */; };
@@ -1374,6 +1376,8 @@
 		DD5DC9F82CF3DAA900AB8703 /* RadioButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioButton.swift; sourceTree = "<group>"; };
 		DD5DC9FA2CF3E1AA00AB8703 /* AdjustmentsStateModel+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AdjustmentsStateModel+Helpers.swift"; sourceTree = "<group>"; };
 		DD68889C2C386E17006E3C44 /* NightscoutExercise.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NightscoutExercise.swift; sourceTree = "<group>"; };
+		DD6A4E7D2DBEBF0F008C4B26 /* StartupReturningUserStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartupReturningUserStepView.swift; sourceTree = "<group>"; };
+		DD6A4E7F2DBEC3EE008C4B26 /* StartupForceCloseWarningStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartupForceCloseWarningStepView.swift; sourceTree = "<group>"; };
 		DD6B7CB12C7B6F0800B75029 /* Rounding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Rounding.swift; sourceTree = "<group>"; };
 		DD6B7CB32C7B71F700B75029 /* ForecastDisplayType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForecastDisplayType.swift; sourceTree = "<group>"; };
 		DD6D67E32C9C253500660C9B /* ColorSchemeOption.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorSchemeOption.swift; sourceTree = "<group>"; };
@@ -1462,11 +1466,11 @@
 		DDF847E52C5D66490049BB3B /* AddMealPresetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMealPresetView.swift; sourceTree = "<group>"; };
 		DDF847E72C5DABA30049BB3B /* WatchConfigAppleWatchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchConfigAppleWatchView.swift; sourceTree = "<group>"; };
 		DDF847E92C5DABAC0049BB3B /* WatchConfigGarminView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchConfigGarminView.swift; sourceTree = "<group>"; };
+		DDFF202E2DB1D14500AB8A96 /* NotificationPermissionStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationPermissionStepView.swift; sourceTree = "<group>"; };
+		DDFF20302DB1D15500AB8A96 /* BluetoothPermissionStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BluetoothPermissionStepView.swift; sourceTree = "<group>"; };
 		DDFF20492DB29EF500AB8A96 /* WatchLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchLogger.swift; sourceTree = "<group>"; };
 		DDFF204D2DB2C00B00AB8A96 /* WatchStateSnapshot.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchStateSnapshot.swift; sourceTree = "<group>"; };
 		DDFF204F2DB2C11900AB8A96 /* WatchStateSnapshot.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchStateSnapshot.swift; sourceTree = "<group>"; };
-		DDFF202E2DB1D14500AB8A96 /* NotificationPermissionStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationPermissionStepView.swift; sourceTree = "<group>"; };
-		DDFF20302DB1D15500AB8A96 /* BluetoothPermissionStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BluetoothPermissionStepView.swift; sourceTree = "<group>"; };
 		E00EEBFD27368630002FF094 /* ServiceAssembly.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServiceAssembly.swift; sourceTree = "<group>"; };
 		E00EEBFE27368630002FF094 /* SecurityAssembly.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecurityAssembly.swift; sourceTree = "<group>"; };
 		E00EEBFF27368630002FF094 /* StorageAssembly.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageAssembly.swift; sourceTree = "<group>"; };
@@ -2791,11 +2795,11 @@
 		BD47FDD52D8B64AE0043966B /* OnboardingSteps */ = {
 			isa = PBXGroup;
 			children = (
+				DD6A4E4E2DBEBC7B008C4B26 /* StartupGuide */,
 				DDFF20302DB1D15500AB8A96 /* BluetoothPermissionStepView.swift */,
 				DDFF202E2DB1D14500AB8A96 /* NotificationPermissionStepView.swift */,
 				DD4A00222DAEF5CD00AB7387 /* AlgorithmSettings */,
 				DDBD53FB2DAA903100F940A6 /* OverviewStepView.swift */,
-				DDF691362DA30332008BF16C /* StartupGuideStepView.swift */,
 				DDF6905B2DA0AFC5008BF16C /* WelcomeStepView.swift */,
 				DDF6902B2DA028D3008BF16C /* DiagnosticsStepView.swift */,
 				DD3F1F8E2D9E151200DCE7B3 /* Nightscout */,
@@ -3303,6 +3307,16 @@
 			path = ViewElements;
 			sourceTree = "<group>";
 		};
+		DD6A4E4E2DBEBC7B008C4B26 /* StartupGuide */ = {
+			isa = PBXGroup;
+			children = (
+				DD6A4E7F2DBEC3EE008C4B26 /* StartupForceCloseWarningStepView.swift */,
+				DD6A4E7D2DBEBF0F008C4B26 /* StartupReturningUserStepView.swift */,
+				DDF691362DA30332008BF16C /* StartupGuideStepView.swift */,
+			);
+			path = StartupGuide;
+			sourceTree = "<group>";
+		};
 		DD9ECB662CA99EFE00AA7C45 /* RemoteControl */ = {
 			isa = PBXGroup;
 			children = (
@@ -4126,6 +4140,7 @@
 				DDD1631F2C4C6F6900CD525A /* TrioCoreDataPersistentContainer.xcdatamodeld in Sources */,
 				DD1745482C55C61D00211FAC /* AutosensSettingsStateModel.swift in Sources */,
 				DD1745462C55C61500211FAC /* AutosensSettingsProvider.swift in Sources */,
+				DD6A4E802DBEC3EE008C4B26 /* StartupForceCloseWarningStepView.swift in Sources */,
 				DDA6E2852D2361F800C2988C /* LoopStatusView.swift in Sources */,
 				DDF691012DA2CA11008BF16C /* AppDiagnosticsDataFlow.swift in Sources */,
 				DDA6E3202D258E0500C2988C /* OverrideHelpView.swift in Sources */,
@@ -4151,6 +4166,7 @@
 				58D08B222C8DAA8E00AA37D3 /* OverrideView.swift in Sources */,
 				BD0B2EF32C5998E600B3298F /* MealPresetView.swift in Sources */,
 				E592A3702CEEC01E009A472C /* ContactTrickEntry.swift in Sources */,
+				DD6A4E7E2DBEBF0F008C4B26 /* StartupReturningUserStepView.swift in Sources */,
 				DD6D67E42C9C253500660C9B /* ColorSchemeOption.swift in Sources */,
 				582DF9752C8CDB92001F516D /* GlucoseChartView.swift in Sources */,
 				BD432CA12D2F4E3600D1EB79 /* WatchMessageKeys.swift in Sources */,

+ 39 - 0
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -2897,6 +2897,7 @@
       }
     },
     " the app before finishing onboarding, " : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -32207,6 +32208,9 @@
         }
       }
     },
+    "All entries you made during Onboarding will be saved automatically when you complete the wizard." : {
+
+    },
     "All FPUs and the carbs of the meal will be deleted." : {
       "comment" : "Alert message for meal deletion",
       "localizations" : {
@@ -46678,6 +46682,9 @@
         }
       }
     },
+    "Be aware" : {
+
+    },
     "Be warned of connectivity or looping issues." : {
       "localizations" : {
         "bg" : {
@@ -102936,6 +102943,7 @@
       }
     },
     "force quit" : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -111791,6 +111799,9 @@
         }
       }
     },
+    "Here's what you can expect to be preserved:" : {
+
+    },
     "Hi there!" : {
       "localizations" : {
         "bg" : {
@@ -119635,6 +119646,9 @@
         }
       }
     },
+    "Important" : {
+
+    },
     "Important message" : {
       "extractionState" : "manual",
       "localizations" : {
@@ -125966,6 +125980,9 @@
         }
       }
     },
+    "Just be aware: if you force quit the app before finishing onboarding, your progress will not be saved." : {
+
+    },
     "Keep these turned ON in your phone’s settings to ensure you receive Trio Notifications, Critical Alerts, and Time Sensitive Notifications." : {
       "localizations" : {
         "bg" : {
@@ -238551,7 +238568,11 @@
         }
       }
     },
+    "You can pause at any time. If you feel like taking a break, do it and put the phone down!" : {
+
+    },
     "You can pause at any time. Just be aware: if you " : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -238851,6 +238872,9 @@
         }
       }
     },
+    "You will also be guided through re-configuring your algorithm settings, respecting Trio's new guardrails." : {
+
+    },
     "You're All Set!" : {
       "localizations" : {
         "bg" : {
@@ -239051,7 +239075,11 @@
         }
       }
     },
+    "Your algorithm settings (previously called \"OpenAPS settings\") are reset to defaults." : {
+
+    },
     "Your algorithm settings (previously called \"OpenAPS settings\") will be reset to defaults." : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -239975,6 +240003,7 @@
       }
     },
     "your progress will not be saved." : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -240074,6 +240103,9 @@
         }
       }
     },
+    "Your pump and CGM configurations are retained and fully functional." : {
+
+    },
     "Your Rights" : {
       "localizations" : {
         "bg" : {
@@ -240174,7 +240206,11 @@
         }
       }
     },
+    "Your therapy settings (basal rates, carb ratios, insulin sensitivities and glucose targets) are carried over." : {
+
+    },
     "Your therapy settings, pump, and CGM configurations will be carried over." : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -240274,6 +240310,9 @@
         }
       }
     },
+    "Your treatment data (pump events, carb entries, glucose trace, etc.) are not migrated." : {
+
+    },
     "ZT" : {
       "localizations" : {
         "bg" : {

+ 47 - 8
Trio/Sources/Modules/Onboarding/View/OnboardingRootView.swift

@@ -12,6 +12,7 @@ extension Onboarding {
         // Step management
         @State private var currentChapter: OnboardingChapter = .prepareTrio
         @State private var currentStep: OnboardingStep = .welcome
+        @State private var currentStartupSubstep: StartupSubstep = .startupGuide
         @State private var currentNightscoutSubstep: NightscoutSubstep = .setupSelection
         @State private var currentDeliverySubstep: DeliveryLimitSubstep = .maxIOB
         @State private var currentAutosensSubstep: AutosensSettingsSubstep = .autosensMin
@@ -65,17 +66,17 @@ extension Onboarding {
 
         // Next button conditional
         private var shouldDisableNextButton: Bool {
-            (currentStep == .startupGuide && !state.hasReadImportantStartupNotes)
-                ||
-                (currentStep == .diagnostics && state.diagnosticsSharingOption == .enabled && !state.hasAcceptedPrivacyPolicy)
+//            (currentStep == .startupGuide && !state.hasReadImportantStartupNotes)
+//                ||
+            (currentStep == .diagnostics && state.diagnosticsSharingOption == .enabled && !state.hasAcceptedPrivacyPolicy)
                 ||
                 (currentStep == .nightscout && didSelectNightscoutSetupOption)
                 ||
                 (currentStep == .nightscout && hasValidNightscoutConnection)
                 ||
                 (currentStep == .nightscout && didSelectNightscoutImportOption)
-                ||
-                (currentStep == .algorithmSettings && !state.hasReadAlgorithmSetupInformation)
+//                ||
+//                (currentStep == .algorithmSettings && !state.hasReadAlgorithmSetupInformation)
         }
 
         var body: some View {
@@ -122,6 +123,7 @@ extension Onboarding {
 
                         OnboardingStepContent(
                             currentStep: $currentStep,
+                            currentStartupSubstep: $currentStartupSubstep,
                             currentNightscoutSubstep: $currentNightscoutSubstep,
                             currentDeliverySubstep: $currentDeliverySubstep,
                             currentAutosensSubstep: $currentAutosensSubstep,
@@ -135,6 +137,7 @@ extension Onboarding {
 
                         OnboardingNavigationButtons(
                             currentStep: $currentStep,
+                            currentStartupSubstep: $currentStartupSubstep,
                             currentNightscoutSubstep: $currentNightscoutSubstep,
                             currentDeliverySubstep: $currentDeliverySubstep,
                             currentAutosensSubstep: $currentAutosensSubstep,
@@ -267,6 +270,7 @@ struct OnboardingProgressBar: View {
 
 struct OnboardingStepContent: View {
     @Binding var currentStep: OnboardingStep
+    @Binding var currentStartupSubstep: StartupSubstep
     @Binding var currentNightscoutSubstep: NightscoutSubstep
     @Binding var currentDeliverySubstep: DeliveryLimitSubstep
     @Binding var currentAutosensSubstep: AutosensSettingsSubstep
@@ -327,8 +331,15 @@ struct OnboardingStepContent: View {
                         switch currentStep {
                         case .welcome:
                             WelcomeStepView()
-                        case .startupGuide:
-                            StartupGuideStepView(state: state)
+                        case .startupInfo:
+                            switch currentStartupSubstep {
+                            case .startupGuide:
+                                StartupGuideStepView(state: state)
+                            case .returningUser:
+                                StartupReturningUserStepView(state: state)
+                            case .forceCloseWarning:
+                                StartupForceCloseWarningStepView(state: state)
+                            }
                         case .overview:
                             OverviewStepView()
                         case .diagnostics:
@@ -385,11 +396,15 @@ struct OnboardingStepContent: View {
                 .padding(.bottom, 80)
             }
             .onChange(of: currentStep) { _, _ in scrollProxy.scrollTo("top", anchor: .top) }
+            .onChange(of: currentStartupSubstep) { _, _ in scrollProxy.scrollTo("top", anchor: .top) }
             .onChange(of: currentNightscoutSubstep) { _, _ in scrollProxy.scrollTo("top", anchor: .top) }
             .onChange(of: currentDeliverySubstep) { _, _ in scrollProxy.scrollTo("top", anchor: .top) }
+            .onChange(of: currentAutosensSubstep) { _, _ in scrollProxy.scrollTo("top", anchor: .top) }
+            .onChange(of: currentSMBSubstep) { _, _ in scrollProxy.scrollTo("top", anchor: .top) }
+            .onChange(of: currentTargetBehaviorSubstep) { _, _ in scrollProxy.scrollTo("top", anchor: .top) }
             .safeAreaInset(edge: .top) {
                 // avoid letting content scroll beneath the status bar / dynamic island for content views with not progress bar (which adds top spacing)
-                if currentStep == .startupGuide || currentStep == .completed {
+                if currentStep == .startupInfo || currentStep == .completed {
                     Color.clear.frame(height: 0)
                 }
             }
@@ -399,6 +414,7 @@ struct OnboardingStepContent: View {
 
 struct OnboardingNavigationButtons: View {
     @Binding var currentStep: OnboardingStep
+    @Binding var currentStartupSubstep: StartupSubstep
     @Binding var currentNightscoutSubstep: NightscoutSubstep
     @Binding var currentDeliverySubstep: DeliveryLimitSubstep
     @Binding var currentAutosensSubstep: AutosensSettingsSubstep
@@ -454,6 +470,21 @@ struct OnboardingNavigationButtons: View {
 
     private func handleBackNavigation() {
         switch currentStep {
+        case .startupInfo:
+            if let previousSub = StartupSubstep(rawValue: currentStartupSubstep.rawValue - 1) {
+                currentStartupSubstep = previousSub
+            } else if let previous = currentStep.previous {
+                currentStep = previous
+                currentStartupSubstep = .startupGuide
+            }
+
+        case .overview:
+            currentStartupSubstep = .forceCloseWarning
+
+            if let previous = currentStep.previous {
+                currentStep = previous
+            }
+
         case .nightscout:
             if currentNightscoutSubstep == .setupSelection,
                let previous = currentStep.previous
@@ -542,6 +573,14 @@ struct OnboardingNavigationButtons: View {
 
     private func handleNextNavigation() {
         switch currentStep {
+        case .startupInfo:
+            if let next = StartupSubstep(rawValue: currentStartupSubstep.rawValue + 1) {
+                currentStartupSubstep = next
+            } else if let nextStep = currentStep.next {
+                currentStep = nextStep
+                currentStartupSubstep = .startupGuide
+            }
+
         case .nightscout:
             if currentNightscoutSubstep != .importFromNightscout {
                 if currentNightscoutSubstep == .setupSelection,

+ 0 - 71
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/StartupGuide/StartupExistingUserStepView.swift

@@ -1,71 +0,0 @@
-//
-//  StartupGuideStepView.swift
-//  Trio
-//
-//  Created by Cengiz Deniz on 06.04.25.
-//
-import SwiftUI
-
-struct StartupGuideStepView: View {
-    @Bindable var state: Onboarding.StateModel
-
-    @Environment(\.openURL) var openURL
-
-    var body: some View {
-        VStack(alignment: .leading, spacing: 20) {
-            Text("Before you begin…")
-                .padding(.horizontal)
-                .font(.title3)
-                .bold()
-
-            VStack(alignment: .leading, spacing: 10) {
-                BulletPoint(String(localized: "Take a deep breath — you've got this."))
-                BulletPoint(String(localized: "There's no rush. Take all the time you need."))
-                BulletPoint(String(localized: "Everything you enter here can be adjusted later in the app."))
-                BulletPoint(String(localized: "Want a hand? You can open our full Startup Guide here:"))
-
-                Button {
-                    openURL(URL(string: "https://triodocs.org/startup-guide")!)
-                } label: {
-                    Text("https://triodocs.org/startup-guide")
-                        .padding(.horizontal, 12)
-                        .padding(.vertical, 8)
-                        .background(Color.blue.opacity(0.2))
-                        .cornerRadius(8)
-                }
-                .frame(maxWidth: .infinity, alignment: .center)
-                .padding(.horizontal)
-            }.padding(.horizontal)
-
-            VStack(alignment: .leading, spacing: 10) {
-                Text("Already using Trio and updating from an older version?").bold()
-                BulletPoint(String(localized: "Your therapy settings, pump, and CGM configurations will be carried over."))
-                BulletPoint(
-                    String(
-                        localized: "Your algorithm settings (previously called \"OpenAPS settings\") will be reset to defaults."
-                    )
-                )
-                BulletPoint(String(localized: "We recommend reviewing them carefully — Trio will guide you step-by-step."))
-            }.padding(.horizontal)
-
-            VStack(alignment: .leading, spacing: 10) {
-                Text("One last thing, before you begin...").bold()
-                HStack {
-                    Text("You can pause at any time. Just be aware: if you ")
-                        + Text("force quit").bold()
-                        + Text(" the app before finishing onboarding, ")
-                        + Text("your progress will not be saved.").bold()
-                }
-            }.multilineTextAlignment(.leading)
-                .padding(.horizontal)
-
-            Divider()
-
-            Toggle(isOn: $state.hasReadImportantStartupNotes) {
-                Text("Got it! I'm ready to continue.").padding(.leading, 6).bold()
-            }
-            .toggleStyle(CheckboxToggleStyle(tint: Color.blue))
-            .padding(.horizontal)
-        }
-    }
-}

+ 53 - 0
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/StartupGuide/StartupForceCloseWarningStepView.swift

@@ -0,0 +1,53 @@
+//
+//  StartupForceCloseWarningStepView.swift
+//  Trio
+//
+//  Created by Cengiz Deniz on 27.04.25.
+//
+import SwiftUI
+
+struct StartupForceCloseWarningStepView: View {
+    @Bindable var state: Onboarding.StateModel
+
+    @Environment(\.openURL) var openURL
+
+    var body: some View {
+        VStack(alignment: .leading, spacing: 20) {
+            Text("One last thing, before you begin...")
+                .font(.title3)
+                .bold()
+
+            VStack(alignment: .leading, spacing: 10) {
+                BulletPoint(
+                    String(localized: "You can pause at any time. If you feel like taking a break, do it and put the phone down!")
+                )
+                BulletPoint(
+                    String(
+                        localized: "All entries you made during Onboarding will be saved automatically when you complete the wizard."
+                    )
+                )
+            }
+            .padding()
+            .background(Color.chart.opacity(0.65))
+            .cornerRadius(10)
+
+            VStack(alignment: .leading, spacing: 10) {
+                HStack(alignment: .top, spacing: 10) {
+                    Image(systemName: "exclamationmark.triangle.fill").foregroundStyle(Color.bgDarkBlue, Color.orange)
+                        .symbolRenderingMode(.palette)
+                    Text("Important").foregroundStyle(Color.orange)
+                }.bold()
+
+                Text("Just be aware: if you force quit the app before finishing onboarding, your progress will not be saved.")
+            }
+            .frame(maxWidth: .infinity)
+            .padding()
+            .background(Color.chart.opacity(0.65))
+            .overlay(
+                RoundedRectangle(cornerRadius: 10)
+                    .stroke(Color.orange, lineWidth: 2)
+            )
+            .cornerRadius(10)
+        }
+    }
+}

+ 45 - 0
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/StartupGuide/StartupGuideStepView.swift

@@ -0,0 +1,45 @@
+//
+//  StartupGuideStepView.swift
+//  Trio
+//
+//  Created by Cengiz Deniz on 06.04.25.
+//
+import SwiftUI
+
+struct StartupGuideStepView: View {
+    @Bindable var state: Onboarding.StateModel
+
+    @Environment(\.openURL) var openURL
+
+    var body: some View {
+        VStack(alignment: .leading, spacing: 20) {
+            Text("Before you begin…")
+                .padding(.horizontal)
+                .font(.title3)
+                .bold()
+
+            VStack {
+                VStack(alignment: .leading, spacing: 10) {
+                    BulletPoint(String(localized: "Take a deep breath — you've got this."))
+                    BulletPoint(String(localized: "There's no rush. Take all the time you need."))
+                    BulletPoint(String(localized: "Everything you enter here can be adjusted later in the app."))
+                    BulletPoint(String(localized: "Want a hand? You can open our full Startup Guide here:"))
+                }
+
+                Button {
+                    openURL(URL(string: "https://triodocs.org/startup-guide")!)
+                } label: {
+                    Text("https://triodocs.org/startup-guide")
+                        .padding(.horizontal, 12)
+                        .padding(.vertical, 8)
+                        .background(Color.blue.opacity(0.2))
+                        .cornerRadius(8)
+                }
+                .frame(maxWidth: .infinity, alignment: .center)
+                .padding(.horizontal)
+            }.padding()
+                .background(Color.chart.opacity(0.65))
+                .cornerRadius(10)
+        }
+    }
+}

+ 83 - 0
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/StartupGuide/StartupReturningUserStepView.swift

@@ -0,0 +1,83 @@
+//
+//  StartupReturningUserStepView.swift
+//  Trio
+//
+//  Created by Cengiz Deniz on 27.04.25.
+//
+import SwiftUI
+
+struct StartupReturningUserStepView: View {
+    @Bindable var state: Onboarding.StateModel
+
+    @Environment(\.openURL) var openURL
+
+    var body: some View {
+        VStack(alignment: .leading, spacing: 20) {
+            Text("Already using Trio and updating from an older version?")
+                .padding(.horizontal)
+                .font(.title3)
+                .bold()
+
+            VStack(alignment: .leading, spacing: 10) {
+                HStack(alignment: .top, spacing: 10) {
+                    Image(systemName: "exclamationmark.triangle.fill").foregroundStyle(Color.bgDarkBlue, Color.orange)
+                        .symbolRenderingMode(.palette)
+                    Text("Important").foregroundStyle(Color.orange)
+                }.bold()
+
+                Text("Your treatment data (pump events, carb entries, glucose trace, etc.) are not migrated.")
+
+                Divider().overlay(Color.orange)
+
+                Text("Your algorithm settings (previously called \"OpenAPS settings\") are reset to defaults.")
+            }
+            .frame(maxWidth: .infinity)
+            .padding()
+            .background(Color.chart.opacity(0.65))
+            .overlay(
+                RoundedRectangle(cornerRadius: 10)
+                    .stroke(Color.orange, lineWidth: 2)
+            )
+            .cornerRadius(10)
+//
+//            VStack(alignment: .leading, spacing: 10) {
+//                HStack(alignment: .top, spacing: 10) {
+//                    Image(systemName: "exclamationmark.triangle.fill").foregroundStyle(Color.bgDarkBlue, Color.orange)
+//                        .symbolRenderingMode(.palette)
+//                    Text("Important").foregroundStyle(Color.orange)
+//                }.bold()
+//
+//                Text("Your algorithm settings (previously called \"OpenAPS settings\") are reset to defaults.")
+//            }
+//            .frame(maxWidth: .infinity)
+//            .padding()
+//            .background(Color.chart.opacity(0.65))
+//            .overlay(
+//                RoundedRectangle(cornerRadius: 10)
+//                    .stroke(Color.orange, lineWidth: 2)
+//            )
+//            .cornerRadius(10)
+
+            VStack(alignment: .leading, spacing: 10) {
+                Text("Here's what you can expect to be preserved:").bold()
+
+                BulletPoint(String(localized: "Your pump and CGM configurations are retained and fully functional."))
+                BulletPoint(
+                    String(
+                        localized: "Your therapy settings (basal rates, carb ratios, insulin sensitivities and glucose targets) are carried over."
+                    )
+                )
+                BulletPoint(String(localized: "We recommend reviewing them carefully — Trio will guide you step-by-step."))
+                BulletPoint(
+                    String(
+                        localized: "You will also be guided through re-configuring your algorithm settings, respecting Trio's new guardrails."
+                    )
+                )
+            }
+            .frame(maxWidth: .infinity)
+            .padding()
+            .background(Color.chart.opacity(0.65))
+            .cornerRadius(10)
+        }
+    }
+}

+ 0 - 71
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/StartupGuideStepView.swift

@@ -1,71 +0,0 @@
-//
-//  StartupGuideStepView.swift
-//  Trio
-//
-//  Created by Cengiz Deniz on 06.04.25.
-//
-import SwiftUI
-
-struct StartupGuideStepView: View {
-    @Bindable var state: Onboarding.StateModel
-
-    @Environment(\.openURL) var openURL
-
-    var body: some View {
-        VStack(alignment: .leading, spacing: 20) {
-            Text("Before you begin…")
-                .padding(.horizontal)
-                .font(.title3)
-                .bold()
-
-            VStack(alignment: .leading, spacing: 10) {
-                BulletPoint(String(localized: "Take a deep breath — you've got this."))
-                BulletPoint(String(localized: "There's no rush. Take all the time you need."))
-                BulletPoint(String(localized: "Everything you enter here can be adjusted later in the app."))
-                BulletPoint(String(localized: "Want a hand? You can open our full Startup Guide here:"))
-
-                Button {
-                    openURL(URL(string: "https://triodocs.org/startup-guide")!)
-                } label: {
-                    Text("https://triodocs.org/startup-guide")
-                        .padding(.horizontal, 12)
-                        .padding(.vertical, 8)
-                        .background(Color.blue.opacity(0.2))
-                        .cornerRadius(8)
-                }
-                .frame(maxWidth: .infinity, alignment: .center)
-                .padding(.horizontal)
-            }.padding(.horizontal)
-
-            VStack(alignment: .leading, spacing: 10) {
-                Text("Already using Trio and updating from an older version?").bold()
-                BulletPoint(String(localized: "Your therapy settings, pump, and CGM configurations will be carried over."))
-                BulletPoint(
-                    String(
-                        localized: "Your algorithm settings (previously called \"OpenAPS settings\") will be reset to defaults."
-                    )
-                )
-                BulletPoint(String(localized: "We recommend reviewing them carefully — Trio will guide you step-by-step."))
-            }.padding(.horizontal)
-
-            VStack(alignment: .leading, spacing: 10) {
-                Text("One last thing, before you begin...").bold()
-                HStack {
-                    Text("You can pause at any time. Just be aware: if you ")
-                        + Text("force quit").bold()
-                        + Text(" the app before finishing onboarding, ")
-                        + Text("your progress will not be saved.").bold()
-                }
-            }.multilineTextAlignment(.leading)
-                .padding(.horizontal)
-
-            Divider()
-
-            Toggle(isOn: $state.hasReadImportantStartupNotes) {
-                Text("Got it! I'm ready to continue.").padding(.leading, 6).bold()
-            }
-            .toggleStyle(CheckboxToggleStyle(tint: Color.blue))
-            .padding(.horizontal)
-        }
-    }
-}

+ 14 - 11
Trio/Sources/Modules/Onboarding/View/OnboardingView+Util.swift

@@ -95,7 +95,7 @@ enum OnboardingChapter: Int, CaseIterable {
 /// Represents the different steps in the onboarding process.
 enum OnboardingStep: Int, CaseIterable, Identifiable, Equatable {
     case welcome
-    case startupGuide
+    case startupInfo
     case overview
     case diagnostics
     case nightscout
@@ -119,17 +119,12 @@ enum OnboardingStep: Int, CaseIterable, Identifiable, Equatable {
         self == .deliveryLimits
     }
 
-    var substeps: [DeliveryLimitSubstep] {
-        guard hasSubsteps else { return [] }
-        return DeliveryLimitSubstep.allCases
-    }
-
     /// The title to display for this onboarding step.
     var title: String {
         switch self {
         case .welcome:
             return String(localized: "Welcome to Trio")
-        case .startupGuide:
+        case .startupInfo:
             return String(localized: "Startup Guide")
         case .overview:
             return String(localized: "Overview")
@@ -173,7 +168,7 @@ enum OnboardingStep: Int, CaseIterable, Identifiable, Equatable {
             return String(
                 localized: "Trio is a powerful app that helps you manage your diabetes. Let's get started by setting up a few important parameters that will help Trio work effectively for you."
             )
-        case .startupGuide:
+        case .startupInfo:
             return String(
                 localized: "Trio comes with a helpful Startup Guide. We recommend opening it now and following along as you go — side by side."
             )
@@ -245,7 +240,7 @@ enum OnboardingStep: Int, CaseIterable, Identifiable, Equatable {
         switch self {
         case .welcome:
             return "hand.wave.fill"
-        case .startupGuide:
+        case .startupInfo:
             return "list.bullet.clipboard.fill"
         case .overview:
             return "checklist.unchecked"
@@ -311,7 +306,7 @@ enum OnboardingStep: Int, CaseIterable, Identifiable, Equatable {
              .notifications,
              .overview,
              .smbSettings,
-             .startupGuide,
+             .startupInfo,
              .targetBehavior,
              .unitSelection,
              .welcome:
@@ -329,7 +324,15 @@ enum OnboardingStep: Int, CaseIterable, Identifiable, Equatable {
 }
 
 var nonInfoOnboardingSteps: [OnboardingStep] { OnboardingStep.allCases
-    .filter { $0 != .welcome && $0 != .startupGuide && $0 != .overview && $0 != .completed }
+    .filter { $0 != .welcome && $0 != .startupInfo && $0 != .overview && $0 != .completed }
+}
+
+enum StartupSubstep: Int, CaseIterable, Identifiable {
+    case startupGuide
+    case returningUser
+    case forceCloseWarning
+
+    var id: Int { rawValue }
 }
 
 enum DeliveryLimitSubstep: Int, CaseIterable, Identifiable {