fix: correzioni critiche e checklist test manuali

CORREZIONI:
- Badge confrontato ESATTAMENTE come stringa (rimosso .lstrip("0"))
- Success modal si chiude quando arriva nuovo badge (fix dipendenze useCallback)
- Polling ogni 30s per invalidare sessione se server riparte
- Area carosello allargata per testi lunghi (es. russo)

DOCUMENTAZIONE:
- API_SPECIFICATION.md aggiornata: badge come stringa esatta
- Creata TEST_CHECKLIST.md con 22 test manuali
- Aggiornati piani backend e frontend

Badge sono STRINGHE, non numeri:
- "0008988288" != "8988288" (zeri iniziali significativi)
This commit is contained in:
2026-01-17 23:32:33 +01:00
parent e68f299feb
commit b467d4753d
11 changed files with 681 additions and 84 deletions

View File

@@ -46,10 +46,11 @@ def clean_badge(badge: str) -> str:
def find_user(badge_code: str) -> dict | None:
"""Cerca un utente per badge code"""
"""Cerca un utente per badge code (confronto esatto come stringa)"""
clean = clean_badge(badge_code)
for user in _data["users"]:
if user["badge_code"] == clean or user["badge_code"].lstrip("0") == clean.lstrip("0"):
# Confronto esatto: il badge è una stringa, non un numero
if user["badge_code"] == clean:
return user
return None