fix(oxibadge): show connection errors instead of failing silently
Check, format and test / build (push) Successful in 10m4s

load_records/load_employees failures were only logged to the console
and silently reset the UI to the month picker. Errors now flow through
a shared store (src/lib/error.ts) into an ErrorBanner, reused by both
Onboarding and ConfirmMonth, with the raw message passed straight
through from Rust (no stable-code classification layer — these are
mostly plain I/O errors, not worth categorizing).

i18n stays grouped per screen as before, with error-related strings
split into their own top-level "errors" group.

Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 13:26:01 +02:00
parent 28186c7745
commit b4cd8e1796
7 changed files with 47 additions and 56 deletions
+3 -7
View File
@@ -10,13 +10,6 @@
"idle": "Testa connessione",
"testing": "Connessione in corso...",
"retry": "Riprova"
},
"error_title": "Impossibile raggiungere il timbratore",
"errors": {
"connection-refused": "Connessione rifiutata",
"timed-out": "Connessione scaduta",
"dns-failure": "Indirizzo non valido o non raggiungibile",
"unknown": "Errore di connessione"
}
},
"confirm_month": {
@@ -38,6 +31,9 @@
"title": "Recupero i dipendenti...",
"description": "Sto leggendo i nomi dei dipendenti registrati sul timbratore. Ci vuole solo un attimo."
},
"errors": {
"title": "Impossibile raggiungere il timbratore"
},
"done": {
"message": "Non c'è niente da fare."
}