-
Notifications
You must be signed in to change notification settings - Fork 93
Fix progress dots mapping, persist variant, clamp restored step #1363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,6 +21,7 @@ final class OnboardingWindow { | |||||||||||||||||
| idx + 1 < CommandLine.arguments.count, | ||||||||||||||||||
| CommandLine.arguments[idx + 1] == "first_meeting" { | ||||||||||||||||||
| state.onboardingVariant = .firstMeeting | ||||||||||||||||||
| UserDefaults.standard.set(OnboardingVariant.firstMeeting.rawValue, forKey: "onboarding.variant") | ||||||||||||||||||
|
Comment on lines
23
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎.
Comment on lines
23
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Step clamping in init() runs before CLI variant override, leaving step out of range When launching with Root cause and reproduction
Reproduction:
This only occurs on the first launch after switching variants via CLI when a higher step was previously saved. Subsequent launches work correctly because the variant is now persisted.
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||||||||||||||
| } | ||||||||||||||||||
| #endif | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Default flow progress dots regression: step 5 no longer lights the last dot
The new generic formula for
activeDotIndexchanges the default flow's step-to-dot mapping in a way that breaks the previous behavior.Detailed mapping comparison and impact
The old hand-coded mapping was:
The new formula
Int(fraction * Double(totalDots - 1) + 0.5)withtotalSteps=7produces:The critical difference is step 5 (ScreenPermissionStepView): it previously mapped to dot 4 (all 5 dots lit), but now maps to dot 3 (only 4 dots lit). This means users on the Screen Permission step see only 4/5 dots filled instead of 5/5, which is a visual regression.
Additionally, step 1 (NamingStepView) now advances the dot from 0 to 1, whereas before steps 0 and 1 shared dot 0. This changes the perceived progress pacing for the default onboarding flow.
Was this helpful? React with 👍 or 👎 to provide feedback.