fix: AI visual barcode fallback fires only once per scanner session

If Gemini cannot identify the product visually, mark _aiFallbackExhausted=true
for the current scanner session so the 5s timer never fires again. The scanner
restarts normally (user can keep trying with the barcode reader) and a persistent
status message is shown: 'AI: product not recognized — try scanning the barcode'.
_aiFallbackExhausted resets to false in stopScanner() so the next camera session
starts fresh.
This commit is contained in:
dadaloop82
2026-05-29 17:43:55 +00:00
parent 98c38f017e
commit b1bcf9e714
6 changed files with 21 additions and 12 deletions
+2 -1
View File
@@ -220,7 +220,8 @@
"status_parallel": "Scan combiné actif...",
"ai_fallback_searching": "Identification IA en cours...",
"ai_fallback_found": "Produit identifié par l'IA",
"ai_fallback_not_found": "IA : produit non reconnu"
"ai_fallback_not_found": "IA : produit non reconnu",
"ai_fallback_exhausted": "IA : produit non reconnu — réessayez avec le code-barres"
},
"action": {
"title": "Que voulez-vous faire ?",