Add period tracking toggle and pregnancy mode warning#127
Merged
Conversation
Adds a "Track period" toggle as the first item in Tracking Modes (on by default). Toggling it off hides the Log Period button from the speed dial and redirects the FAB quick-log to the speed dial when period logging is not active. The period logging screen gets a three-dot overflow menu with "Disable period logging", which does the same thing and navigates back. Activating Pregnancy Tracking when period logging is on now shows a confirmation dialog explaining that period logging will be paused and any categories pinned to the period log will be archived automatically. https://claude.ai/code/session_01WNRZUGk5XKqSUAWTVBuZGg
DB migration v20 sets showInLogPeriod = 1 on both the Flow and Symptoms system categories so they behave like any other period-pinned category: they are included in the archive step when Pregnancy Tracking activates, and they respect the flag going forward. LogPeriodScreen now gates the Flow and Symptoms sections on showInLogPeriod == true && !isArchived instead of hardcoding them always visible. The sync methods that write flow/symptoms to tracking_logs also bail out when the category is hidden, preventing phantom data from being saved. Pinned-category loading excludes system categories to avoid rendering them twice. New installs get showInLogPeriod = 1 in the seed data. Existing users get the flag set via migration. https://claude.ai/code/session_01WNRZUGk5XKqSUAWTVBuZGg
603b265 to
ae9ab83
Compare
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
Implementation notes
periodTrackingEnabledis a new DataStore preference (defaulttrue). No DB schema change.archiveCategory()path on each non-system category returned by the existinggetShowInLogPeriodCategoriesOnce()DAO query.showInLogPeriod = false.Test plan
https://claude.ai/code/session_01WNRZUGk5XKqSUAWTVBuZGg
Generated by Claude Code