-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
complexity-mediumMedium implementation complexityMedium implementation complexityfeatureRequest or implement a new featureRequest or implement a new featureuiUI/UX related issue or improvementUI/UX related issue or improvement
Milestone
Description
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, andprepared_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 adjustprepared_multiplierfrom 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
- UI allows editing of
name. - UI allows adding, removing and updating
items(ingredient entries: name, quantity, unit) and saving changes. - UI allows adjusting
prepared_multiplierand saving changes. - Domain validation blocks invalid saves and returns clear errors surfaced to users via
showError. - Application performs optimistic updates with rollback on error and logs failures via
logging. - Repository persists partial updates correctly and maintains backwards compatibility with legacy DAO shapes.
- Unit and integration tests cover domain validation and the edit use case.
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; ensureitemsschema andprepared_multiplierchecks are enforced. - Application: Implement
editRecipeuse case to validate, call repository, update signals, and handle optimistic updates/rollback. - Infrastructure: Ensure
supabaseRecipeRepositorysupports 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.tssrc/modules/diet/recipe/domain/recipeOperations.tssrc/modules/diet/recipe/application/recipe.tssrc/modules/diet/recipe/infrastructure/supabaseRecipeRepository.tssrc/sections/recipe/components/RecipeEditModal.tsx
Labels: feature, complexity-medium, ui
Assignee: marcuscastelo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
complexity-mediumMedium implementation complexityMedium implementation complexityfeatureRequest or implement a new featureRequest or implement a new featureuiUI/UX related issue or improvementUI/UX related issue or improvement