Hydration
Status: Current implemented behavior. Audience: Users and contributors. Implementation:
features/hydration,features/hydration/reminders,features/manualentry/hydration,data/repository/HydrationRepository.kt. Navigation:Screen.Metric, hydration entry routes, widgetHYDRATION,ManualEntryWidgetId.HYDRATION. Related: Feature map, Beverage logging and caffeine, Reminders.
The hydration feature owns the period-based hydration detail screen and hydration reminder controls.
What It Shows
Hydration can show:
- Daily hydration totals.
- Period totals and trends.
- Goal progress.
- Previous-period comparison and baseline context.
- Hydration entries, including entries created from beverage logging.
- Nutrition-only drinks: a drink logged in OpenVitals without water, or another app’s nutrition record that carries caffeine or a known drink’s name. Records OpenVitals imported from Apple Health or synced from another phone count as another app’s, so a meal from them never shows as a drink and an imported “Coffee” does not count towards your frequent drinks. Logged foods, typed nutrition totals and CSV rows never show as drinks.
- Data confidence and source labels.
- Hydration reminder configuration.
Detail Pattern
Hydration follows the canonical metric detail model:
- Day, week, month, and year ranges.
- Selected anchor date.
- Previous/next navigation and calendar selection.
- Pull to refresh.
- Reorderable detail sections.
- Selected-day charts and entry history.
OpenVitals-created hydration entries can be edited or deleted from the relevant entry flow. External Health Connect records remain read-only.
Reminders
Hydration reminders are local notification reminders. The feature stores reminder preferences locally, checks notification permission on supported Android versions, and does not create Health Connect records when reminders fire.
Related Features
beverage-logging-and-caffeine.md: drink logging, hydration multipliers, caffeine, and nutrition defaults.reminders.md: shared reminder behavior for hydration and mindfulness.