You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ACK de alerta já concluído devolve "acknowledged" e o botão de concluir reaparece (RF05) #86
Problema.alerts.acknowledge (backend/sinalacs_server/lib/src/endpoints/alerts_endpoint.dart:69) sempre devolve status: AlertStatus.acknowledged quando o ACK é aceito, mesmo que o alerta já esteja resolved. Desde a #76 o armazenamento (orm_alert_store.dart, acknowledge) não rebaixa resolved, então o banco fica certo, mas a resposta mente.
Cenário. O ACS conclui o atendimento no aparelho A. No aparelho B (ou numa reentrega do MQTT), o ACK do mesmo alerta volta como acknowledged, e o app do ACS mostra outra vez o botão "Concluir atendimento". O toque devolve alreadyResolved e corrige a tela, mas até lá o estado exibido está errado.
O que falta.
AlertStore.acknowledge devolver o status real da linha travada (não só bool), e o endpoint repassá-lo em AlertAckResult.status.
O app do ACS tratar status == resolved no retorno do ACK como markResolved.
Teste de backend: ACK num alerta resolved devolve status: resolved; teste de widget do ACS para o botão não reaparecer.
Invariantes: INV-03 (toda mudança de status auditada na mesma transação) continua valendo; esta correção não muda o status gravado, só o devolvido.
Activity