Skip to content

Allow logging multiple doses per day for multi-dose schedules - #116

Merged
snachodog merged 2 commits into
mainfrom
multi-dose-logging
Aug 18, 2026
Merged

Allow logging multiple doses per day for multi-dose schedules#116
snachodog merged 2 commits into
mainfrom
multi-dose-logging

Conversation

@snachodog

Copy link
Copy Markdown
Owner

Summary

  • Today screen now allows logging up to the expected number of doses per day for twice-daily and three-times-daily schedules, instead of capping every schedule at one dose ("Taken 2 of 3 today" progress with per-dose timestamps and undo, same pattern as as-needed meds)
  • Fixes a crash where a FastAPI validation error (422) rendered its raw detail array directly as a React child instead of a message, via a shared apiErrorMessage helper used across Settings.jsx
  • Disables "Add medication" when no person exists/selected, preventing a guaranteed validation failure (person_id: null)

Closes #114

Test plan

  • Manually verified on Today screen: added a med with "Three Times Daily" schedule, confirmed "Took it" can be tapped 3 times with progress shown, then disables
  • Verified single-dose schedules (morning/evening/etc.) unchanged
  • Verified as-needed meds unaffected
  • npx vite build clean after each change
  • Manually triggered a validation error and confirmed a readable message now shows instead of a crash
  • Verified "Add medication" is disabled with no person selected

@snachodog
snachodog merged commit f2fdd56 into main Aug 18, 2026
1 check passed
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.

[bug]: Today screen: "took it" disappears after first does on multiple dose schedules

1 participant