fix(onboarding): the connect step reads the sync verdict

The step decided "connected" from the ledger's `state` and had one piece of
copy for every outcome: "the first sync is in progress". That sentence was
false for a connection delivering for months, and worse for one the person
has to repair — the screen said everything was fine while the grant was gone.

`connectSourceView` resolves the envelope entry into one of four tiles and
says whether the flow may record its result. Only `pending_first_sync` and
`fresh` may; `stale` is acknowledged without being claimed as new; `stalled`,
`failing`, `reauth_required` and `parked` name the state and link at the page
that can change it. An unresolved envelope paints no tile at all.

A source the instance cannot connect — a BYO provider with no client pair, a
shared-app provider with no app — now points at the credentials instead of
offering a "Connect" button onto a card that has none.
This commit is contained in:
Marc-André Bombeck committed 2026-09-11 09:15:32 +02:00
1 parent 0bdbf009f6
commit da58d16642
11 files changed
+883 -45

No files matched your search

+37 -3
View File
@@ -4677,12 +4677,46 @@
"connect-source": {
"title": "Conectar {target}",
"body": "Una conexión, elegida según tus respuestas. Después las mediciones llegan solas.",
"howTo": "La conexión se hace en la página de integraciones. Vuelve aquí después; esta pantalla detecta cuándo está lista.",
"howTo": "La conexión con {target} se hace en la página de integraciones. Vuelve aquí después; esta pantalla detecta cuándo está lista.",
"cta": "Conectar {target}",
"checking": "Comprobando la conexión.",
"waiting": "Aún no conectado.",
"done": "{target} está conectado.",
"syncing": "La primera sincronización está en marcha. Las mediciones aparecen en el panel a medida que llegan."
"openSettings": "Abrir Ajustes → Integraciones",
"noDate": "desconocido",
"needsCredentials": {
"title": "Esta instancia aún no tiene una aplicación de {target} registrada.",
"detail": "Introduce tus propias credenciales en Ajustes → Integraciones y la conexión podrá empezar."
},
"state": {
"pending_first_sync": {
"title": "{target} está conectado.",
"detail": "La primera sincronización está en marcha. Los valores aparecerán en el panel en cuanto lleguen."
},
"fresh": {
"title": "{target} ya está conectado.",
"detail": "Último valor {when}. Aquí no queda nada por hacer."
},
"stale": {
"title": "{target} está conectado, pero ahora mismo no llega nada.",
"detail": "Último valor {when}. La conexión en sí está bien."
},
"stalled": {
"title": "{target} está conectado, pero ha dejado de sincronizar.",
"detail": "Último intento {when}. Revisa la conexión en Ajustes → Integraciones."
},
"failing": {
"title": "{target} está conectado, pero la sincronización falla.",
"detail": "No ha llegado nada desde {when}. Revisa la conexión en Ajustes → Integraciones."
},
"reauth_required": {
"title": "Hay que renovar la conexión con {target}.",
"detail": "Inicia sesión una vez más y los valores seguirán llegando."
},
"parked": {
"title": "La conexión con {target} está en pausa.",
"detail": "Revisa la conexión en Ajustes → Integraciones."
}
}
},
"add-medication": {
"title": "Añade tu primer medicamento",