Profile: derive age from date of birth instead of a manual number (#146)#6
Closed
digitalerdude wants to merge 2 commits into
Closed
Profile: derive age from date of birth instead of a manual number (#146)#6digitalerdude wants to merge 2 commits into
digitalerdude wants to merge 2 commits into
Conversation
…anbr#146) Age silently went stale once entered, so age-based metrics (Fitness Age, HR-max/Tanaka, calorie estimates) drifted unless the user remembered to bump the number. ProfileStore now stores a dateOfBirth and computes age from it; the Settings and onboarding age Stepper become a DatePicker. A pre-ryanbr#146 install's stored age is migrated into an equivalent date of birth on first launch, and the legacy profile.age UserDefaults key stays mirrored so the existing cross-platform .noopbak backup whitelist keeps round-tripping unchanged.
Owner
Author
|
Closing this fork-internal PR to declutter — the real submission lives at ryanbr/noop (upstream). See that repo's PR list for the current, actionable version of this work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ProfileStorenow persistsdateOfBirthand computesagefrom it instead of storing a manually-entered, silently-staling number. Every existing consumer (HR-max/Tanaka, calories, Fitness Age, Body Age) keeps readingprofile.ageunchanged since it stays a computedInt.Stepperbecome aDatePicker, bounded to the same 13–100 age range the stepper enforced.profile.ageUserDefaults key stays mirrored on every change so the cross-platform.noopbakbackup whitelist (BackupSettings.swift, mirrored by Android) keeps round-tripping unchanged — no changes needed there. A resync path also handles the case where a.noopbakrestore only carries the legacy age key.Test plan
Strand) and iOS (NOOPiOS) targets both build clean viaxcodebuild.profile.agecall site across the app (HR zones, calories, Fitness/Body Age, IntelligenceEngine) — confirmed none needed changes.🤖 Generated with Claude Code