Skip to content

Surface tracked nutrient totals in daily nutrition and food log#14

Merged
rwestergren merged 1 commit into
mainfrom
feature/issue-13-tracked-nutrients
Jun 9, 2026
Merged

Surface tracked nutrient totals in daily nutrition and food log#14
rwestergren merged 1 commit into
mainfrom
feature/issue-13-tracked-nutrients

Conversation

@rwestergren

Copy link
Copy Markdown
Owner

get_daily_nutrition returned the nutrient catalog instead of consumed amounts. Rewire it to report consumed totals for every tracked nutrient, and add the same summary to get_food_log.

Closes #13

get_daily_nutrition returned the nutrient catalog instead of consumed
amounts. Rewire it to report consumed totals for every tracked nutrient,
and add the same summary to get_food_log.

Closes #13
@rwestergren rwestergren merged commit 78b21b0 into main Jun 9, 2026
1 check passed
@rwestergren rwestergren deleted the feature/issue-13-tracked-nutrients branch June 9, 2026 09:28
rwestergren pushed a commit that referenced this pull request Jun 15, 2026
* Add saturated_fat_g to add_custom_food

Custom foods could not include saturated fat — the field had no parameter,
so foods created via the API silently undercounted daily saturated fat
totals (now surfaced in summaries since #14).

Adds saturated_fat_g (per-serving, g, default 0) to add_custom_food,
wired to nutrient ID 606 with the same per-100g scaling as other
nutrients. Backward compatible — existing calls are unaffected.

Field-tested for 3 weeks as a local patch driving a personal food
library with cardiovascular-target tracking.

The same pattern extends naturally to cholesterol, trans_fat, and
omega_3/6 (already in NUTRIENT_IDS) if there's interest in a follow-up.

* Reformat saturated_fat nutrient entry to satisfy ruff
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.

Feature: Include saturated fat and key micronutrients in get_daily_nutrition / get_food_log summary

1 participant