Skip to content

Support configurable macro/micronutrient targets in config.toml #25

@ali5ter

Description

@ali5ter

Problem

The Nutrition tab currently uses generic 2000 kcal / RDV references. Issue #11 was closed as won't-fix because the WW API doesn't return user-specific targets.

But users do know their own targets — from their plan (WW Med+, MyPlate, custom), from a clinician, or from a coach. Hard-coding generic RDVs limits the tool's usefulness for anyone tracking against personalized goals.

Why this matters

Personalized targets are the single biggest discriminator between "general fitness app" and "tool that actually answers 'am I on plan today?'". For over-50s recomposition on GLP-1, the personalized protein floor (e.g., 130g) and calorie maintenance band (e.g., 1700–1900) drive every weekly decision. The generic 2000 kcal / 50g protein reference is misleading at best for anyone with a tailored plan.

Proposal

Extend ~/.config/wwlog/config.toml with a [targets] section. All keys optional; when present, the Nutrition tab and report use them; when absent, current behaviour is preserved.

tld = "com"

[targets]
calories          = [1700, 1900]   # min, max maintenance band
protein_g         = [130, 150]     # min, max
carbs_g           = [158, 228]
fat_g             = [31, 54]
fiber_g_min       = 26
sodium_mg_max     = 2300
added_sugar_g_max = 35
points_daily      = 23             # override / supplement WW pointsInfo

Range bands ([min, max]) render as a target window; single _min / _max values render as a floor or ceiling.

Acceptance criteria

  • config.Targets struct loaded from ~/.config/wwlog/config.toml
  • Nutrition tab bars switch from generic RDV to user targets when configured
  • --report shows ✓ / ⚠ / ✗ per metric vs. target band or ceiling
  • Range bands display as a target window; single values as a ceiling/floor
  • Documented in README under "Configuration"
  • Fallback behaviour preserved when no [targets] section is present

Notes


🤖 Generated with over-50s-health-advisor (Claude Code agent) on behalf of Alister

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions