docs: HANDOFF update — TICKET-007 complete

This commit is contained in:
Craig
2026-07-26 17:27:55 +01:00
parent 7db64840f7
commit ce91852321
+27 -4
View File
@@ -19,11 +19,34 @@ pending user testing), and OpenFoodFacts lookup/search.
| 004 Day summary endpoint | ✅ done, QA passed | `5372e8c` |
| 005 Frontend daily view | ✅ done, QA passed | `b69661c` |
| 006 OFF + barcode scan/search flows | ✅ done, QA passed (backend `32461b7`, frontend below) | `32461b7` + frontend |
| 007 Meals (from-log, unpack, recursion) | **next** | — |
| 008 Food library view + restore | ⬜ pending | — |
| 007 Meals (from-log, unpack, recursion) | ✅ done, QA passed | `a8aed9a` + `7db6484` |
| 008 Food library view + restore | ⬜ **next** | — |
Test counts at HEAD: backend **152 passed** (`cd backend && uv run pytest`),
frontend **18 vitest passed** + `npm run build` green.
Test counts at HEAD: backend **174 passed** (`cd backend && uv run pytest`),
frontend **23 vitest passed** + `npm run build` green.
## TICKET-007 notes (session 3)
- Backend: `routers/meals.py` (from-log, unpack, PUT components — each one
transaction), recursive meal nutrition + cycle detection in
`services/nutrition.py`/`services/meals.py`; ticket-004 TODO removed —
summary, `GET /api/foods/{id}` (MealRead w/ `computed_nutrition_per_meal`),
and `GET /api/log` (nested `components` in LogFoodRead) all show real
derived meal nutrition. Unpack scaling verified (1.5× meal → 1.5× each
component); cycles (direct + transitive) → 422.
- Frontend: Dashboard "☑ Select entries" → multi-select → MealBuilder overlay
(save-as-meal); LogEntry meal rows collapsible + 🔓 Unpack + "Edit
components" → FoodEditor meal mode (`appView='editMeal'`,
`mealEdit.foodId` in stores); meal kcal fix in `format.js`
(`caloriesForEntry` uses backend `computed_nutrition`, not
`calories_per_unit` which is null for meals).
- **Process:** both implementer subagent runs this session returned truncated
output mid-implementation (rate limits?) — the second one wrote nothing.
Orchestrator implemented the meal component editor + the select-mode entry
point fix directly. QA agent (playwright-cli) worked well both runs and
caught the save-as-meal chicken-and-egg UX bug (checkboxes rendered only
when already selecting). Consider checking subagent reports against `git
status` before trusting them.
## What was done this session