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/urls_htmx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kitchen/urls_htmx.py') diff --git a/kitchen/urls_htmx.py b/kitchen/urls_htmx.py index 5c11447..1feb76c 100644 --- a/kitchen/urls_htmx.py +++ b/kitchen/urls_htmx.py @@ -10,11 +10,11 @@ urlpatterns = [ # HTMX partials — pantry path("pantry/add/", views_htmx.pantry_add, name="app-pantry-add"), + path("pantry/search/", views_htmx.pantry_search, name="app-pantry-search"), + path("pantry//state/", views_htmx.pantry_set_state, name="app-pantry-set-state"), path("pantry//delete/", views_htmx.pantry_delete, name="app-pantry-delete"), path("pantry//move/", views_htmx.pantry_move, name="app-pantry-move"), - path("pantry//edit-expiry/", views_htmx.pantry_edit_expiry, name="app-pantry-edit-expiry"), path("pantry//save-expiry/", views_htmx.pantry_save_expiry, name="app-pantry-save-expiry"), - path("pantry/cancel-edit/", views_htmx.pantry_cancel_edit, name="app-pantry-cancel-edit"), # HTMX partials — shopping path("shopping/generate/", views_htmx.shopping_generate, name="app-shopping-generate"), -- cgit v1.2.3