Repository navigation
feat(web): choose optional ingredients for the shopping list - #593
Merged
Merged
Conversation
Member
Author
|
@claude lets fix conflicts |
|
Claude finished @dubadub's task in 28s —— View job I couldn't fix the conflicts. The sandbox denied The local You can also resolve them locally with |
dubadub
force-pushed
the
feat/optional-shopping-web
branch
from
October 15, 2026 13:09
8a5d756 to
e627b2b
Compare
Following spec proposal 0018 on the web:
- Recipe page: optional ingredients and cookware are labelled
(optional), in cooking mode too, and optional ingredients get an
unticked checkbox that decides whether they go on the shopping list.
Required and optional amounts of one ingredient are listed apart.
- POST /api/shopping_list/add takes optional_ingredients (names); the
server works out the amounts at the entry's scale and stores them as
`? name{quantity}` selection lines in .shopping-list.
- The shopping list page sends the stored selections back, and
POST /api/shopping_list lists only required ingredients plus those,
each item carrying "optional".
- add_menu leaves out optional recipes in a menu (`@?./Cake{}`).
Core: StoredEntry::optional_ingredients / OptionalSelection,
optional_selections() and add_optional_selections().
dubadub
force-pushed
the
feat/optional-shopping-web
branch
from
October 15, 2026 16:18
e627b2b to
d61c42f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of the CookCLI side of spec proposal 0018. Follows #592 (merged).
Recipe page
(optional)(localised, all 9 locales), also in cooking mode's mise en place.parmesan 100 g,parmesan 50 g (optional)), not merged.Stored list
POST /api/shopping_list/addtakesoptional_ingredients: [names]. The server computes the amounts from the recipe at the entry's scale (summing occurrences, one line per non-convertible unit) and stores selection lines:GET /api/shopping_list/itemsreturns them asoptional_ingredients: [{name, quantity}]; a? ./pathline written by another app is not mistaken for an included reference.add_menuleaves out optional recipes in a menu (@?./Cake{}), using theoptionalflag added toMenuItem::RecipeReferencein cooklang-find 0.12.0 (feat(menu)!: mark optional recipe references cooklang-find#38); CookCLI moves to cooklang-find 0.12.Generated list
POST /api/shopping_listacceptsoptional_ingredientsper recipe (as stored), lists required ingredients plus those, and each item carriesoptional. The list page and its copy-as-text mark them.Core
StoredEntry::optional_ingredients,OptionalSelection,optional_selections(),add_optional_selections();subtract_pantry_from_optionalmade public for the server.Tests
Store round-trips (selection lines written before references, menus, foreign
? ./pathlines), core selection computation (scaling, summing, unit split, required/unknown names ignored), and a newshopping_list_optional_api_testdriving the real server: choose → stored line → listed as optional at the stored amount; unchosen stays off; menus skip optional recipes.docs/api.mdregenerated.Not yet
Choosing optional recipe references in the UI; pantry-based recipe matching (part 3).