Skip to content

feat: display nutrition data from metadata#359

Open
romainhild wants to merge 1 commit into
cooklang:mainfrom
romainhild:feature/display-nutrition
Open

feat: display nutrition data from metadata#359
romainhild wants to merge 1 commit into
cooklang:mainfrom
romainhild:feature/display-nutrition

Conversation

@romainhild

Copy link
Copy Markdown
Contributor

Goal

Display nutrition information stored in .cook recipe metadata in the web UI, when available. The info are in a collapsible section between the metadata pill and the recipe steps.
Two storage formats exist: flat top-level keys (hand-authored) and a nested nutrition: mapping (from imported recipes).
Display only if at least one information is available.
Display the metadata as-is, no checks, no scalings, no fetching data.

image

Scope

  • No changes to cooklang-rs — nutrition is not a StdKey; we read it from the raw metadata map
  • No changes to the CLI recipe command output — this is UI-only
  • No per-serving scaling of nutrition values — values are displayed as stored
  • Both builder instances in builders.rs updated for consistency

Out of scope

  • Nutrition per-serving math when scaling
  • Editing nutrition from the UI
  • CLI text/JSON output of nutrition

Specs and implementation plans have been added in docs/

Disclaimer: The implementation has been done using Claude Code. I made the designs decisions and have reviewed the code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant