···4444 if o == nil || o.Status != OnboardingInProgress {
4545 return OnboardingProgress{}
4646 }
4747- // Percent reflects completed steps out of the total, so the bar only fills
4848- // as steps are finished (e.g. on the last step it is not yet 100%).
4947 total := OnboardingStepDone
5050- percent := o.Step * 100 / total
5151- if percent > 100 {
5252- percent = 100
5353- }
4848+ percent := min(o.Step*100/total, 100)
5449 return OnboardingProgress{
5550 Active: true,
5651 Step: o.Step,