kiwi/app/api/endpoints
pyr0ball e7ba305e63
Some checks are pending
CI / Backend (Python) (push) Waiting to run
CI / Frontend (Vue) (push) Waiting to run
Mirror / mirror (push) Waiting to run
feat: hierarchical subcategory navigation in recipe browser
Adds a two-level browse tree (domain → category → subcategory) to the
recipe browser, plus an "All" unfiltered option at the top of every
domain.

browser_domains.py:
- Category values now support list[str] (flat) or dict with "keywords"
  and "subcategories" keys — backward compatible with all existing flat
  categories
- Added subcategories to: Italian (Sicilian, Neapolitan, Tuscan, Roman,
  Venetian, Ligurian), Mexican (Oaxacan, Yucatecan, Veracruz, Street
  Food, Mole), Asian (Korean, Japanese, Chinese, Thai, Vietnamese,
  Filipino, Indonesian), Indian (North, South, Bengali, Gujarati),
  Mediterranean (Greek, Turkish, Moroccan, Lebanese, Israeli), American
  (Southern, Cajun/Creole, BBQ, Tex-Mex, New England), European
  (French, Spanish, German, British/Irish, Scandinavian), Latin American
  (Peruvian, Brazilian, Colombian, Cuban, Caribbean), Dinner, Lunch,
  Breakfast, Snack, Dessert, Chicken, Beef, Pork, Fish, Vegetables
- New helpers: category_has_subcategories, get_subcategory_names,
  get_keywords_for_subcategory

store.py:
- get_browser_categories now accepts has_subcategories_by_category and
  includes has_subcategories: bool in each result row
- New get_browser_subcategories method for subcategory count queries

recipes.py endpoints:
- GET /browse/{domain}/{category}/subcategories — returns subcategory
  list with recipe counts (registered before /{subcategory} to avoid
  path collision)
- GET /browse/{domain}/{category} gains optional ?subcategory=X param
  to narrow results within a category
- GET /browse/{domain}/{category}/_all — unfiltered paginated browse
  (landed in previous commit)

api.ts: BrowserCategory adds has_subcategories; new BrowserSubcategory
type; listSubcategories() call; browse() gains subcategory param

RecipeBrowserPanel.vue:
- Category pills show a › indicator when subcategories exist
- Selecting such a category fetches subcategories in the background
  (non-blocking — recipes load immediately at the category level)
- Subcategory row appears below the category list with an
  "All [Category]" pill + one pill per subcategory with count
- Active subcategory highlighted; clicking "All [Category]" resets
  to the full category view
2026-04-18 21:07:06 -07:00
..
__init__.py chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
community.py fix: recipe enrichment backfill, main_ingredient browser domain, bug batch 2026-04-18 15:38:56 -07:00
export.py fix: recipe enrichment backfill, main_ingredient browser domain, bug batch 2026-04-18 15:38:56 -07:00
feedback.py refactor: use shorter circuitforge_core.api import for feedback router 2026-04-05 21:21:50 -07:00
feedback_attach.py feat: screenshot attachment in feedback form (#82) 2026-04-15 23:08:02 -07:00
health.py chore: initial commit — kiwi Phase 2 complete 2026-03-30 22:20:48 -07:00
household.py fix: recipe enrichment backfill, main_ingredient browser domain, bug batch 2026-04-18 15:38:56 -07:00
imitate.py chore: commit in-progress work -- tag inferrer, imitate endpoint, hall-of-chaos easter egg, migration files, Dockerfile .env defense 2026-04-14 13:23:15 -07:00
inventory.py fix: re-fetch inventory item after insert to populate product_name (#99) 2026-04-18 16:02:35 -07:00
meal_plans.py feat: wire meal planner slot editor and meal type picker 2026-04-16 14:23:38 -07:00
ocr.py fix: wire recipe corpus to cloud per-user DBs via SQLite ATTACH (#102) 2026-04-18 14:21:56 -07:00
orch_usage.py feat(kiwi): add /orch-usage proxy endpoint for frontend budget display 2026-04-14 15:42:58 -07:00
receipts.py fix: recipe enrichment backfill, main_ingredient browser domain, bug batch 2026-04-18 15:38:56 -07:00
recipes.py feat: hierarchical subcategory navigation in recipe browser 2026-04-18 21:07:06 -07:00
saved_recipes.py fix: recipe enrichment backfill, main_ingredient browser domain, bug batch 2026-04-18 15:38:56 -07:00
session.py fix: suppress E2E test sessions from log-based analytics 2026-04-18 19:06:37 -07:00
settings.py feat: metric/imperial unit preference (#81) 2026-04-15 23:04:29 -07:00
shopping.py fix: wire recipe corpus to cloud per-user DBs via SQLite ATTACH (#102) 2026-04-18 14:21:56 -07:00
staples.py feat: recipe + staple API endpoints with tier gating 2026-03-31 12:49:38 -07:00