reportedBy: github-copilot.v1
Improve recipe editing: enable editing of existing recipe fields (name, items, prepared_multiplier)
Summary
- Enable editing of the recipe fields that currently exist in the domain model:
name, items, and prepared_multiplier.
Scope
- This issue focuses on UI and application support for editing existing recipe fields. It does NOT add new schema fields (e.g., tags, prep time, servings). Schema extensions will be tracked separately.
Description
- Users must be able to modify recipe
name, add/remove/update items (ingredient entries), and adjust prepared_multiplier from the UI. Changes must be validated at the domain layer and persisted via the repository with proper error handling and telemetry.
Motivation
- Improve usability by allowing users to edit the fields that already exist in the model without introducing immediate schema changes or data migrations.
Acceptance criteria
Implementation notes
- Frontend: Update
src/sections/recipe/components/RecipeEditModal.tsx (or the responsible component) to expose and validate existing fields and item list controls.
- Domain: Use existing Zod schemas (
src/modules/diet/recipe/domain/recipe.ts) for validation; ensure items schema and prepared_multiplier checks are enforced.
- Application: Implement
editRecipe use case to validate, call repository, update signals, and handle optimistic updates/rollback.
- Infrastructure: Ensure
supabaseRecipeRepository supports partial updates (update fields provided in a patch object) and DAO conversions.
- Tests: Add unit tests for validation and integration tests for the edit flow.
Files to inspect
src/modules/diet/recipe/domain/recipe.ts
src/modules/diet/recipe/domain/recipeOperations.ts
src/modules/diet/recipe/application/recipe.ts
src/modules/diet/recipe/infrastructure/supabaseRecipeRepository.ts
src/sections/recipe/components/RecipeEditModal.tsx
Labels: feature, complexity-medium, ui
Assignee: marcuscastelo
reportedBy: github-copilot.v1
Improve recipe editing: enable editing of existing recipe fields (name, items, prepared_multiplier)
Summary
name,items, andprepared_multiplier.Scope
Description
name, add/remove/update items (ingredient entries), and adjustprepared_multiplierfrom the UI. Changes must be validated at the domain layer and persisted via the repository with proper error handling and telemetry.Motivation
Acceptance criteria
name.items(ingredient entries: name, quantity, unit) and saving changes.prepared_multiplierand saving changes.showError.logging.Implementation notes
src/sections/recipe/components/RecipeEditModal.tsx(or the responsible component) to expose and validate existing fields and item list controls.src/modules/diet/recipe/domain/recipe.ts) for validation; ensureitemsschema andprepared_multiplierchecks are enforced.editRecipeuse case to validate, call repository, update signals, and handle optimistic updates/rollback.supabaseRecipeRepositorysupports partial updates (update fields provided in a patch object) and DAO conversions.Files to inspect
src/modules/diet/recipe/domain/recipe.tssrc/modules/diet/recipe/domain/recipeOperations.tssrc/modules/diet/recipe/application/recipe.tssrc/modules/diet/recipe/infrastructure/supabaseRecipeRepository.tssrc/sections/recipe/components/RecipeEditModal.tsxLabels: feature, complexity-medium, ui
Assignee: marcuscastelo