Skip to content

Add By Day, By Hour, and Timing stats charts; fix symptom time tracking#126

Merged
mapgie merged 3 commits into
mainfrom
claude/symptom-time-tracking-nRGXA
Jun 6, 2026
Merged

Add By Day, By Hour, and Timing stats charts; fix symptom time tracking#126
mapgie merged 3 commits into
mainfrom
claude/symptom-time-tracking-nRGXA

Conversation

@mapgie

@mapgie mapgie commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix: Symptoms logged from the period log screen now record the time when the Symptoms category has "Track against time" enabled. syncSymptomsToTrackingLog() was always passing an empty loggedAt, silently ignoring the trackAgainstTime flag.

  • Feature: Three new chart types in the Stats screen, all accessible from the "Chart type" selector:

    • "By Day" — bar chart showing how often (or average value for numeric categories) a category was logged on each day of the week (Mon–Sun). Answers: "do I get headaches most on Fridays?"
    • "By Hour" — bar chart in 2-hour slots showing when during the day a category is usually logged. Only shown when the category has "Track against time" enabled. Answers: "what time of day do my headaches happen?"
    • "Timing" — scatter plot with date on X and hour-of-day on Y, overlaying two time-tracked categories as differently-coloured dots. Makes lead/lag relationships visible — e.g. seeing that hormone logs at 8am consistently precede headache logs at 6pm on the same days.

Test plan

  • Enable "Track against time" on a category (e.g. Headaches), log a few entries, open Stats and confirm "By Hour" appears in the chart type selector
  • Confirm "By Day" appears for any single category and shows Mon–Sun bars
  • Select two categories that both have "Track against time" enabled; confirm "Timing" appears and plots both as differently-coloured dots on the date×hour grid
  • Confirm "By Hour" and "By Day" do NOT appear when two categories are selected
  • For the symptom fix: enable "Track against time" on the Symptoms category, log a period with symptoms, confirm the tracking log for that day has a non-empty loggedAt time

https://claude.ai/code/session_018JqDNoQmTRpYxFJJ9kVhw8

claude added 2 commits June 6, 2026 12:32
syncSymptomsToTrackingLog() always passed an empty loggedAt, so the
Symptoms category's trackAgainstTime flag was silently ignored for
any entry saved from the period log screen.

https://claude.ai/code/session_018JqDNoQmTRpYxFJJ9kVhw8
@mapgie mapgie changed the title Fix symptoms not recording time when Track Against Time is enabled Add By Day, By Hour, and Timing stats charts; fix symptom time tracking Jun 6, 2026
ChartDataComputer and DashboardScreen both had exhaustive when
expressions over ChartType / StatsChartData that didn't cover the
three new WEEKDAY, TIME_OF_DAY, and TIME_CORRELATION cases.

https://claude.ai/code/session_018JqDNoQmTRpYxFJJ9kVhw8
@mapgie mapgie marked this pull request as ready for review June 6, 2026 13:58
@mapgie mapgie merged commit c19ba28 into main Jun 6, 2026
4 checks passed
@mapgie mapgie deleted the claude/symptom-time-tracking-nRGXA branch June 6, 2026 13:58
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