kiwi/app/services
pyr0ball fb18a9c78c feat: partial consumption tracking and waste/disposal logging (#12 #60)
#12 — partial consume:
- POST /inventory/items/{id}/consume now accepts optional {quantity}
  body; decrements by that amount and only marks status=consumed when
  quantity reaches zero (store.partial_consume_item)
- OFFs barcode scan pre-fills sub-unit quantity when product data
  includes a pack size (number_of_units or 'N x ...' quantity string)
- Consume button shows quantity-aware label and opens ActionDialog
  with number input for multi-unit items ('use some or all')
- consumeItem() in api.ts now returns InventoryItem and accepts
  optional quantity param

#60 — disposal logging:
- Migration 031: adds disposal_reason TEXT column to inventory_items
  (status='discarded' was already in the CHECK constraint)
- POST /inventory/items/{id}/discard endpoint with optional DiscardRequest
  body (free text or preset reason)
- Calm framing: 'item not used' not 'wasted'; reason presets avoid
  blame language ('went bad before I could use it', 'too much — had excess')
- Muted discard button (X icon, tertiary color) — not alarming

Shared:
- New ActionDialog.vue component for dialogs with inline inputs
  (quantity stepper or reason dropdown); keeps ConfirmDialog simple
- disposal_reason field added to InventoryItemResponse

Closes #12
Closes #60
2026-04-16 07:28:21 -07:00
..
community feat(community): KiwiCommunityStore + pseudonym helpers in per-user store 2026-04-13 10:54:13 -07:00
export chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
image_preprocessing chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
meal_plan docs(bsl): document cf-text/LLMRouter routing chain in llm_timing and llm_planner 2026-04-12 14:07:32 -07:00
ocr chore: bump circuitforge-core dep to >=0.8.0; fix stale resources imports 2026-04-04 22:39:04 -07:00
quality chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
recipe fix: wire recipe engine to cf-text service instead of vllm 2026-04-16 06:25:46 -07:00
__init__.py chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
barcode_scanner.py feat: cloud auth bypass, VRAM leasing, barcode EXIF fix, pipeline improvements 2026-04-01 16:06:23 -07:00
expiration_predictor.py feat: pantry intel cluster — #61 expiry display, #64 cook log, #66 scaling, #59 open-package tracking 2026-04-16 06:01:25 -07:00
heimdall_orch.py feat(kiwi): add Heimdall orch budget client with fail-open semantics 2026-04-14 15:15:43 -07:00
inventory_service.py chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
openfoodfacts.py feat: partial consumption tracking and waste/disposal logging (#12 #60) 2026-04-16 07:28:21 -07:00
receipt_service.py chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
receipt_service_inmemory_backup.py chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00