Files
mealie/COOKING_OPERATIONS.md
T
jfmcarreira 8dad430650
Release Drafter / auto_label (push) Skipped
Release Drafter / draft_release (push) Canceled after 0s
CodeQL / Analyze (javascript-typescript) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
Backend Lint and Test / tests (sqlite) (push) Canceled after 0s
Backend Lint and Test / tests (postgres) (push) Canceled after 0s
Docker Nightly Production / Backend Server Tests (push) Canceled after 0s
Frontend Lint and Test / lint (push) Canceled after 0s
Docker Nightly Production / Frontend Tests (push) Canceled after 0s
Build Package / Build frontend and wheel (push) Canceled after 0s
Docker Nightly Production / Build Package (push) Canceled after 0s
Docker Nightly Production / Build E2E Image Cache (push) Canceled after 0s
Docker Nightly Production / Build Tagged Release (push) Canceled after 0s
Docker Nightly Production / Notify Discord (push) Canceled after 0s
feat(recipe): add step quantities and appliance settings
2026-12-01 13:05:50 +00:00

71 lines
3.6 KiB
Markdown

# Fork-specific cooking operations
Optional native data; no appliance, scales or cooking mode is executed by
Mealie. Device interpretation and supported wire values belong to integrations.
Existing recipes need no appliance information.
## Ingredient references
`quantityKind` distinguishes `full`, `partial`, `remaining`, `unknown`,
`prepared`, `asNeeded` and `referenceOnly`. Missing kinds preserve the legacy
null/full and numeric/explicit behavior. A partial portion requires a number,
including an explicit zero.
Non-numeric kinds store a zero **compatibility sentinel** in `quantity` so older
clients cannot inherit the recipe total. Current clients use the kind instead:
unknown/prepared/qualitative/reference-only associations have no numeric amount.
A remainder is calculated only when unambiguous and never persisted as a fixed
portion.
`weighing` is unspecified (including null/missing), `manual` or `weigh`; grams
alone never authorize scales. Unknown or non-allocation references cannot request
weighing. `role`, `destination`, `quantityMinimum`, `quantityMaximum`,
`approximate`, `containerCount` and `sourceText` preserve allocation context.
Quantities use the ingredient's unit and are per-container when a count exists.
The editor checks the whole allocation ledger, including inherited quantities,
container counts and repetitions, and warns about ambiguous remainders.
Shopping lists still use recipe totals. Display scaling does not rewrite native
quantities or machine settings. Stable allocation IDs keep completion independent.
## Operation settings
`durationSeconds` accepts finite positive seconds with millisecond precision;
legacy zero remains unspecified. Exact seconds and the existing minute shortcut
are both editable.
The existing optional `cooking` object adds:
- `actionType`, `timerType`, `applianceInstance`: generic action/appliance context.
- `accessories`: named items with installed/removed/unknown/conditional/open/closed
states, including lid context; no installation is inferred from prose.
- `durationKind`, `durationRangeSeconds`, `durationCondition`: fixed, ranged,
user-selected or condition-controlled time.
- `speedKind`, `speedRange`, `speedProgression`: retain ranges and ordered ramps
independently of an existing fixed/selected `speed`.
- `modeParameters`: named text, number, boolean or range parameters, with units.
Source labels such as thickness or doneness remain unchanged.
- `optional`, `condition`, `requiresConfirmation`, `repetitions`,
`repetitionRange`, `dependsOnStepIds`: declarative execution context, not a
workflow engine. Dependencies must belong to this recipe and be acyclic.
- `reviews`: categorized evidence, candidate ingredient IDs, resolution, approved
native content and history. Linking a candidate starts with an unknown amount.
Resolution requires an explanation; subsequent edits reopen approved reviews.
Omitting reviews cannot erase their provenance. Bridge extras are untouched.
Native JSON, duplication, editing and printing preserve these fields.
Duplication/import remap identities and dependencies together. Unsafe merges
are refused; undo restores safe merges.
## Deployment
Back up the database and deploy backend/frontend together. Migrations
`e274a9d13c50` (fractional duration) and `d3f629aa71b4` (allocation context) retain
legacy values. Duration downgrade refuses fractional data; allocation downgrade
removes the new columns and requires an export/backup.
Use the existing lockfile and pinned pnpm version. Schema/types are generated
with the project's tooling. Validation-only tools need not become application
dependencies. Repository-wide pre-existing TypeScript debt is outside this
feature change.