cauldron/cauldron/templates
Sulkta 6539bd4049 v0.2: household-shared picks pool + /plan with lock button + scoreboard + streak
DB:
- migration 006 — cauldron_households (mirrors Mealie household), members
- migration 007 — cauldron_meal_plans (per household per week, lock state)
- new helpers: upsert_household, add_household_member, get_user_household_id,
  list_household_member_subs, get_or_create_plan, lock_plan,
  auto_lock_past_unlocked_plans, household_scoreboard, household_streak,
  list_household_pick_slugs, list_household_picks_with_pickers

Backend:
- sync_user_household() — pulls Mealie's /api/users/self, upserts the
  household row, ensures membership. Fires on /connect-mealie POST and
  lazy on every /me / /picks / /plan / /recipes load.
- current_household_id() helper used by all user-facing routes
- /recipes + /api/recipes.json now mark items.picked=True if ANYONE in the
  household has pinned (shared pool, not per-user)
- /picks now renders household-pooled view with attribution (who pinned what)
- /plan replaces stub: shows current week's lock state + lock button +
  scoreboard + streak. POST /api/plan/lock locks this week's plan with
  reason='user'. Past unlocked weeks auto-lock on read with reason='auto'.
- /list still stub (v0.3 territory)

UI:
- picks.html: each pick shows '🍄 pinned by <name(s)>' attribution row,
  unpin button only on your own picks, household_size in lede
- plan.html: NEW. Lock state pill, lock button (open weeks only), scoreboard
  table with rank/wins/last_win, streak ribbon ('🔥 bob on a 3-week run')
  if streak >= 2
- me.html: shows household name + member count

Locking semantics match Alice's pick:
- (c) both — user-lock = scoreboard win, auto-lock past calendar = no win.
  Auto-lock fires lazily on /plan view (no cron needed for v0.2).
- Picks pool = (a) shared across household.
- Game shape = medium (locked-by + tally + streak counter, room for richer
  badges/notifs in v0.4).
2026-04-28 21:11:11 -07:00
..
_base.html v0.2 — meal picks, infinite scroll, search, mushroom vibes, mobile polish 2026-04-28 20:53:07 -07:00
_recipe_card.html v0.2 — meal picks, infinite scroll, search, mushroom vibes, mobile polish 2026-04-28 20:53:07 -07:00
connect.html ui: extract templates + add /recipes browse + sulkta-meets-gothic palette 2026-04-28 20:38:54 -07:00
me.html v0.2: household-shared picks pool + /plan with lock button + scoreboard + streak 2026-04-28 21:11:11 -07:00
picks.html v0.2: household-shared picks pool + /plan with lock button + scoreboard + streak 2026-04-28 21:11:11 -07:00
plan.html v0.2: household-shared picks pool + /plan with lock button + scoreboard + streak 2026-04-28 21:11:11 -07:00
recipe_detail.html v0.2 — meal picks, infinite scroll, search, mushroom vibes, mobile polish 2026-04-28 20:53:07 -07:00
recipes.html v0.2 — meal picks, infinite scroll, search, mushroom vibes, mobile polish 2026-04-28 20:53:07 -07:00
stub.html ui: extract templates + add /recipes browse + sulkta-meets-gothic palette 2026-04-28 20:38:54 -07:00