Skip to content

feat(frontend): AI emergency report UI (banner + history cards) - #361

Merged
GiZano merged 5 commits into
mainfrom
feat/frontend-ai-reports
Aug 5, 2026
Merged

feat(frontend): AI emergency report UI (banner + history cards)#361
GiZano merged 5 commits into
mainfrom
feat/frontend-ai-reports

Conversation

@GiZano

@GiZano GiZano commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

Consumes the new EMERGENCY_REPORT WebSocket messages (v1.2.0 AI Emergency Reports) and presents them inline in the mobile app.

Changes

  • WebSocketContext.tsx — handles EMERGENCY_REPORT messages: tracks lastReport, pushes to the alert store, fires a notification; AlertMessage now carries alert_id.
  • useAlertStore.ts — new reports map keyed by alert_id plus addReport; cleared with clearAlerts.
  • AlertHistoryList.tsx — renders a report card for each history alert: full summary + recommendations when COMPLETED, or a "Report non disponibile" badge when FAILED.
  • app/(tabs)/index.tsx — inline AiReportCard banner for the latest alert.
  • __tests__/useAlertStore.test.ts — report add/replace/clear coverage.

Verification

  • 7/7 store tests pass (Jest)
  • ESLint clean on all touched files

Notes

  • Depends on the backend ai_reports channel (part of the Backend PR) at runtime.

@GiZano
GiZano requested a review from riccardo0731 as a code owner August 5, 2026 14:34
@GiZano
GiZano force-pushed the feat/frontend-ai-reports branch from 8c15311 to 65073c8 Compare August 5, 2026 15:27
@GiZano
GiZano force-pushed the feat/frontend-ai-reports branch from 095db7c to 74c2809 Compare August 5, 2026 21:32
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@GiZano
GiZano merged commit 5618cb4 into main Aug 5, 2026
7 checks passed
@GiZano
GiZano deleted the feat/frontend-ai-reports branch August 5, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant