From 0aabf50834a31ff4ae9f8fd58639e444a449110b Mon Sep 17 00:00:00 2001 From: Tom Flux Date: Tue, 23 Jun 2026 19:55:16 +0100 Subject: Phase 1: mobile-first pantry redesign with In/Low/Out state Track presence (In/Low/Out) as the primary signal instead of exact quantities; quantity becomes an optional integer, unit optional too (migration 0003 backfills state from quantity: 0 -> out, else in). - Pantry rebuilt as a phone-first card list: colored state rail, segmented In/Low/Out switch (server-driven HTMX), greyed out-items, live summary counts. - Fast add: bottom add bar with type-ahead autocomplete, location picker, and quick-add chips for things you've run out of. - Per-item menu (move / set expiry / delete); expiry is now an optional quiet pill, never required. - New endpoints: pantry search + set-state; dropped the old edit-expiry/cancel flow and its partial. - Recipes matcher made presence-based (have-it beats have-enough); state added to admin. Tests cover state, add/restock, search, presence matching, and page rendering. Co-Authored-By: Claude Opus 4.8 --- kitchen/templates/kitchen/base.html | 1 + kitchen/templates/kitchen/pantry.html | 366 +++++++++++++++++++-- .../kitchen/partials/pantry_suggestions.html | 21 ++ .../templates/kitchen/partials/pantry_table.html | 143 +++----- 4 files changed, 408 insertions(+), 123 deletions(-) create mode 100644 kitchen/templates/kitchen/partials/pantry_suggestions.html (limited to 'kitchen/templates') diff --git a/kitchen/templates/kitchen/base.html b/kitchen/templates/kitchen/base.html index 6bd33bf..323e985 100644 --- a/kitchen/templates/kitchen/base.html +++ b/kitchen/templates/kitchen/base.html @@ -398,6 +398,7 @@ td, th { padding: 0.35rem 0.5rem; font-size: 0.8rem; } } + {% block extrastyle %}{% endblock %}