Files
EverShelf/data/shopping_name_cache.json
dadaloop82 1a73ed91dd fix: compound shopping names + auto-Bring on depletion + panna da cucina
1. shopping_name compound-phrase map (computeShoppingName)
   Add phraseMap checked against the full product name BEFORE the single-token
   keyword loop.  Prevents 'pane grattugiato' → 'Pane', 'panna da cucina' → 'Panna', etc.
   Key new phrases:
   - pane/pan grattugiato → Pangrattato
   - panna da cucina / panna cucina / panna chef → Panna da cucina
   - fette biscottate → Fette biscottate
   - aceto balsamico / glassa balsamico → Aceto balsamico
   - latte condensato/evaporato/vegetale/di soia/mandorla/avena/riso/cocco → specific
   - prosciutto cotto → Prosciutto cotto
   - farina di riso/mais/integrale → specific
   - pasta fresca, zucchero di canna, acqua minerale/frizzante/gassata, brodo, …
   Also added single-token safety-net entries: 'grattugiato'/'grattato'/'pangrattato'
   → 'Pangrattato', 'biscottate' → 'Fette biscottate'.

2. DB migration (sqlite3 UPDATE)
   Re-classified 10 products that had wrong shopping_name:
   Pane grattugiato → Pangrattato
   Panna da cucina (×4) → Panna da cucina
   Fette biscottate (×2) → Fette biscottate
   Aceto balsamico (×3) → Aceto balsamico
   Cleared 2 stale Gemini cache entries.

3. showLowStockBringPrompt (app.js)
   When totalRemaining <= 0 (product fully depleted), skip the modal entirely.
   The backend already auto-adds to Bring! on depletion; the JS only asks as a
   fallback if that failed (fire-and-forget async, never blocks the UI).
   The afterCallback (e.g. move-remainder modal, navigate to dashboard) is called
   immediately without user interaction.
2026-04-27 12:04:48 +00:00

20 lines
936 B
JSON

{
"dc1bb00e006a5ed073aad9b0ca2f1601": "Toast",
"f03b656f4cfaa9d633fc155cdafcb83b": "Sale",
"fa1266e5e6bb32602e08aaf9434ec9ad": "Patate",
"ca2da3ad2a7b42e717f766e06a83730e": "Verdure",
"ce8f4f54fc6ead0f0a8ce36503bba462": "Pasta",
"2ddb0faf33c4ceeed89fada2c7c2b9c5": "Ingredienti Spezie",
"0290647fcd95ec97f0d6666c46a72943": "Brodo",
"405ea6ec33d54042d046599650f422ea": "Succo",
"f624c420f14d8eff122c0bb395eb63da": "Snack Dolci",
"92751fbb97923590c402bc7810778b36": "Biscotti",
"8727f7abcb66764b5eb3d1f036bc18b8": "Tè",
"0eb53fe1a5d4d106eac47c8a81d1afe7": "Farina",
"0ebada5597d1d166d0ed8f49500bfeba": "Verdure",
"fe7456efb7e767a06e3af9f5ec7b3637": "Piatti Pronti",
"2a5d2289bb7bc306dd066dfaff7ef581": "Ingredienti Spezie",
"b630c06f2ac72a1e2ffbd57d327a3733": "Salsa",
"32a05ae91ccfa4d37be454836971436b": "Ingredienti",
"a21f0e7718c8f12166d864d0d05f60a0": "Salsa"
}