admin and Claude Sonnet 4.6
35f736a052
fix(planner): correct set_size to 3 dinners and switch cost filter to per-serving
...
- set_size 21→3, top_k 20→10: generate 3 weekly dinners not full 3×7 matrix
- All 3 items assigned MealType.DINNER on Mon/Wed/Fri
- RecipeCost gains servings field + cost_per_serving property
- compute_recipe_cost accepts servings param (default 4)
- filter.py gates on cost_per_serving instead of total_cost
- max_meal_cost 500→50 (now a meaningful $/serving threshold)
- Email displays ~$X/serving instead of inflated raw total
- select_set: candidate_pool uses max(top_k, set_size) to prevent
combinations(n<set_size) returning empty iterator
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-05-22 07:20:17 -07:00
admin
7b5e65087e
feat: 21 meals per week (3/day) + approve/deny + generate single meal
...
Backend:
- Planner config: set_size=21 (was 3), top_k=30 (was 20)
- generate.py: distribute 21 recipes across 7 days × 3 meal types
- meals.py: add POST /items/{id}/approve, /items/{id}/deny
- meals.py: add POST /{plan_id}/generate-item for empty slots
Frontend:
- Dashboard: Approve/Deny buttons on pending meal cards
- Dashboard: Generate button in empty meal slots
- API client: approveItem, denyItem, generateItem methods
Build: TypeScript compiles clean, Python syntax verified.
2026-05-15 11:44:04 -07:00
admin
6323eadc86
fix: test-email actually sends; vote page pre-checks existing votes; lowercase MealPlanItemStatus everywhere
...
- /api/admin/test-email now calls get_email_backend().send() instead of only logging.
- /api/meals/vote/{id} GET now queries MealPlanVote and renders 'already voted' confirmation if found.
- api/meals.py: fix remaining uppercase MealPlanItemStatus enum ref (DENIED, APPROVED, PENDING).
- Fixes the 'all meals show as pending' status regression and the 'Error: Already voted' bug.
2026-05-14 12:17:44 -07:00
admin
3f92e1f641
feat: planner orchestrator - load, filter, score, select, persist
2026-05-06 09:11:53 -07:00