Skip to Content
FeaturesNutrition

Nutrition

Status: Current implemented behavior. Audience: Users and contributors. Implementation: features/nutrition, features/manualentry/nutrition, data/repository/NutritionRepository.kt. Navigation: Screen.Nutrition, Screen.CarbsEntry, Screen.Metric; widgets CALORIES_IN, PROTEIN, CARBS, FAT. Related: Feature map, Manual entry of metrics, Preloaded beverage nutrition reference.

The nutrition feature owns period-based nutrition detail screens for intake metrics read from Health Connect.

Implemented Metrics

Nutrition metric detail screens currently cover:

  • Calories in.
  • Protein.
  • Carbohydrates.
  • Fat.

Caffeine is intentionally separate. It is a caffeine-specific analytics and setup experience described in beverage-logging-and-caffeine.md.

Detail Pattern

Nutrition metrics follow the canonical period-detail pattern:

  • Day, week, month, and year ranges.
  • Selected anchor date.
  • Previous/next navigation and calendar selection.
  • Pull to refresh.
  • Goal progress for supported intake metrics.
  • Period charts, selected-day breakdowns, entries, statistics, comparisons, confidence, and source labels.
  • Reorderable detail sections.

Nutrition records remain in Health Connect. OpenVitals writes nutrition records through explicit entry flows such as carbohydrate entry and beverage logging; the nutrition detail screens remain read-oriented.