Skip to content

Add period tracking toggle and pregnancy mode warning#127

Merged
mapgie merged 2 commits into
mainfrom
claude/period-logging-config-hyWXo
Jun 6, 2026
Merged

Add period tracking toggle and pregnancy mode warning#127
mapgie merged 2 commits into
mainfrom
claude/period-logging-config-hyWXo

Conversation

@mapgie

@mapgie mapgie commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Track period toggle in Tracking Modes. A new "Track period" card appears first in the Tracking Modes list, enabled by default. Toggling it off hides the Log Period button from the speed dial and redirects the FAB quick-log action to open the speed dial instead of navigating to the period log screen. Toggling it back on restores everything.
  • 3-dot menu on the period logging screen. A "Disable period logging" option in the overflow menu does the same as the Tracking Modes toggle and navigates back.
  • Pregnancy activation warning. When the user activates Pregnancy Tracking while period logging is on, a confirmation dialog explains that period logging will be paused and any categories pinned to the period log will be archived automatically. Clicking Continue disables period logging, archives those categories, then proceeds to the normal activation sheet. Clicking Cancel aborts.

Implementation notes

  • periodTrackingEnabled is a new DataStore preference (default true). No DB schema change.
  • The archiving on pregnancy activation calls the existing archiveCategory() path on each non-system category returned by the existing getShowInLogPeriodCategoriesOnce() DAO query.
  • Flow and Symptoms (system categories hardcoded in the period log screen) are unaffected by the archive operation since they carry showInLogPeriod = false.
  • Period history data and calendar markers remain visible when period tracking is disabled; only the interactive logging entry points are hidden.

Test plan

  • Open Tracking Modes. Confirm "Track period" toggle appears first, is on by default, and visually matches the mode cards.
  • Toggle "Track period" off. Confirm the Log Period item disappears from the speed dial and tapping the FAB opens the speed dial instead of the period log screen.
  • Toggle "Track period" back on. Confirm Log Period returns in the speed dial.
  • Open the period logging screen. Confirm the three-dot menu appears and "Disable period logging" turns off period tracking and navigates back.
  • Activate Pregnancy Tracking when period logging is on. Confirm the warning dialog appears, Cancel aborts, Continue disables period logging and proceeds to the activation sheet.
  • Add a category with "Log with period" enabled, then activate Pregnancy Tracking. Confirm that category is archived after confirming the dialog.
  • Re-enable period tracking. Confirm no crashes; previously archived categories remain archived (user must manually unarchive).

https://claude.ai/code/session_01WNRZUGk5XKqSUAWTVBuZGg


Generated by Claude Code

claude added 2 commits June 6, 2026 17:08
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
@mapgie mapgie force-pushed the claude/period-logging-config-hyWXo branch from 603b265 to ae9ab83 Compare June 6, 2026 17:09
@mapgie mapgie marked this pull request as ready for review June 6, 2026 17:27
@mapgie mapgie merged commit 0746840 into main Jun 6, 2026
4 checks passed
@mapgie mapgie deleted the claude/period-logging-config-hyWXo branch June 6, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants