--- phase: 04-frontend verified: 2026-02-25T00:10:00Z status: human_needed score: 4/4 must-haves verified human_verification: - test: "Alert banner appears on all tabs when active critical alerts exist" expected: "A red banner shows above the nav bar on overview, documents, and upload tabs — not just on the monitoring tab — whenever there are active service_down or service_degraded alerts" why_human: "Cannot trigger live alerts programmatically; requires the backend health probe to actually record a service failure in Supabase" - test: "Alert acknowledge removes the banner immediately (optimistic update)" expected: "Clicking Acknowledge on a banner alert removes it instantly without a page reload, even before the API call completes" why_human: "Requires live alert data in the database and a running application to observe the optimistic update behavior" - test: "Monitoring tab shows health status cards for all four services with colored dots and last-checked timestamp" expected: "Document AI, LLM API, Supabase, Firebase Auth each appear as a card; each card has a colored dot (green/yellow/red/gray) and shows a human-readable last-checked timestamp or 'Never checked'" why_human: "Requires the backend GET /admin/health endpoint to return live data from the service_health_checks table" - test: "Processing analytics shows real Supabase-sourced data with range selector" expected: "Total Uploads, Succeeded, Failed, Success Rate, Avg Processing Time stat cards show values from Supabase; changing the range selector to 7d or 30d fetches updated figures" why_human: "Requires processed documents and analytics events in Supabase to validate that data is real and not empty/stubbed" - test: "Non-admin user navigating to monitoring tab sees Access Denied" expected: "A logged-in non-admin user who somehow reaches activeTab=monitoring (e.g., via browser state manipulation) sees the Access Denied message, not the AdminMonitoringDashboard" why_human: "The tab button is hidden for non-admins but a runtime state change cannot be tested without a non-admin account in the running app" --- # Phase 4: Frontend Verification Report **Phase Goal:** The admin can see live service health, processing metrics, and active alerts directly in the application UI **Verified:** 2026-02-25T00:10:00Z **Status:** human_needed **Re-verification:** No — initial verification ## Goal Achievement ### Observable Truths (from Phase 4 Success Criteria) | # | Truth | Status | Evidence | |---|-------|--------|---------| | 1 | An alert banner appears at the top of the admin UI when there is at least one unacknowledged critical alert, and disappears after the admin acknowledges it | ? NEEDS HUMAN | Code structure is correct: AlertBanner is rendered above `