feat: cooked leftovers shelf-life estimator #112
Labels
No labels
accessibility
backlog
beta-feedback
bug
duplicate
enhancement
feature-request
help wanted
invalid
needs-design
needs-triage
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/kiwi#112
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
After a user cooks a recipe, surface an estimate of how long the leftovers will keep. Two storage types: refrigerated and frozen. Different foods have very different windows (fish 1–2 days, most proteins 3–5, soups/stews 4–5, casseroles up to a week; frozen for months).
UX
Post-cook flow: After tapping "I cooked this", a shelf-life section appears inline below the confirmation. User can dismiss it per-instance. A preference ("Show leftover shelf-life after cooking", default on) hides it globally.
Cook log: Always shows the shelf-life info — no preference applies here. It is reference data when looking back at what was cooked.
Shelf-life data is computed at mark-as-cooked time and stored in the cook log entry (or transiently cached by recipe_id + cook date if no storage schema is added yet).
Proposed backend approach
Add
cooked_leftovers_shelf_life(recipe_title, ingredients, storage_type)toapp/services/expiration_predictor.py— follows the existing LLM fallback pattern already used for raw pantry items.Return:
days: int— conservative estimatestorage_advice: str— one-sentence human note (e.g. "Store in an airtight container in the back of the fridge, not the door")freeze_by_day: int | None— if the dish freezes well, how many days from cook date before it should be frozen insteadImplementation notes
show_leftover_shelf_life(bool, default true) in user settings storefeedback_kiwi_no_panic.md) — frame as helpful info, not a countdown