Skip to content

Add saturated_fat_g to add_custom_food#15

Merged
rwestergren merged 2 commits into
rwestergren:mainfrom
corcyra:add-custom-food-saturated-fat
Jun 15, 2026
Merged

Add saturated_fat_g to add_custom_food#15
rwestergren merged 2 commits into
rwestergren:mainfrom
corcyra:add-custom-food-saturated-fat

Conversation

@corcyra

@corcyra corcyra commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

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.

(Follow-up from #13 — thanks for the fast turnaround on that one!)

corcyra and others added 2 commits June 12, 2026 20:54
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 rwestergren#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.
@rwestergren rwestergren merged commit a69e7a9 into rwestergren:main Jun 15, 2026
1 check passed
@corcyra corcyra deleted the add-custom-food-saturated-fat branch June 17, 2026 01:47
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