feat: recipe scaling, cook from pantry, store-section shopping list - #16
Open
phil08533 wants to merge 2 commits into
Open
feat: recipe scaling, cook from pantry, store-section shopping list#16phil08533 wants to merge 2 commits into
phil08533 wants to merge 2 commits into
Conversation
- Add useCustomRecipes hook with localStorage persistence (CRUD) - Add CreateRecipeModal for creating and editing custom recipes - Rewrite RecipeSearchModal with My Recipes tab (BookOpen), Saved tab, and Create button in header; detail view handles custom vs API recipes - Wire useFavorites and useCustomRecipes into App for snapshot access - Full-snapshot save/load (version 2 format: pantry + meals + favorites + customRecipes) replacing the old partial export - File System Access API auto-save on Chrome/Edge; blob download fallback on Safari/other; auto-save toggle opens file picker and debounces writes https://claude.ai/code/session_015pnZpcPJegpdvYPTtz4ook
Recipe scaling - Store defaultServings (4 for TheMealDB, recipe.serves for custom) on each meal entry when added to the plan - WeekIngredientsSummary scales per-recipe: people / meal.defaultServings - Detail view preview also uses per-recipe defaultServings - CreateRecipeModal adds a Serves field (default 4) Cook from pantry - New utils/pantryMatch.js: calcPantryMatch + getTopKitchenIngredients - getMealsByIngredient added to mealdb.js - "From Pantry" chip (ChefHat icon) in RecipeSearchModal fetches meals by kitchen ingredients, calculates match %, sorts best-match first - Match badge (X/Y) on each card: green ≥80%, amber ≥50%, gray <50% - pantry match pill shown in detail view header - kitchen prop threaded RecipesPage → RecipeSearchModal Shopping list by store section - New utils/storeCategories.js with keyword lookup for 8 sections - ShoppingPage groups by getStoreSection(item.name) in logical aisle order instead of alphabetical category sort https://claude.ai/code/session_015pnZpcPJegpdvYPTtz4ook
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.
Summary
Recipe scaling — ingredient amounts now scale correctly to your household size. Each recipe stores
defaultServings: 4(TheMealDB) orrecipe.serves(custom). The weekly shopping summary and the detail view preview both applypeople / defaultServingsper recipe instead of a fixed ÷2 guess.Cook from Pantry — new "From Pantry" chip (chef hat icon) in the recipe search modal. Tapping it fetches recipes that feature your kitchen ingredients, pulls full details for the top 15 matches, and sorts them by pantry coverage. Each card shows a match badge (e.g. "9/12") — green ≥80%, amber ≥50%, gray below. The detail view also shows a "X/Y in pantry" pill.
Shopping list by store section — items are now grouped by logical grocery aisle (Produce → Meat & Seafood → Dairy & Eggs → Bakery → Frozen → Canned & Dry Goods → Oils/Sauces/Spices → Beverages → Other) instead of alphabetical category sort. Categorization is automatic based on ingredient name.
Test plan
https://claude.ai/code/session_015pnZpcPJegpdvYPTtz4ook
Generated by Claude Code