J-16 — Review Daily Operations Dashboard
One-liner: GM gets a single-screen view of yesterday and today: occupancy, RevPAR, ADR, arrivals, departures, in-house, EOD variance, AI insights.
1. Purpose
GM gets a single-screen daily view of operations: occupancy, RevPAR, ADR, arrivals/departures/in-house, EOD variance, AI insights, exceptions to attention. Outcome: GM can grasp property health in <= 60 seconds and know which exceptions to action.
2. Persona Context
- Persona: GM.
- Surface: Electron Desktop.
- Primary BFF:
bff-backoffice-service.
- Backing services:
reporting-service, ai-orchestrator-service, audit-service.
- Preconditions: Reporting projection up-to-date.
- Trigger: GM lands on Manager view.
3. Entry Points
| # | Entry | Notes |
|---|
| 1 | Default Manager landing | Default |
| 2 | "Daily digest" notification deep link | Pre-opens dashboard |
4. Screen-by-Screen Flow
4.1 OperationsDashboardScreen
- Layout: Grid of tiles: Occupancy %, RevPAR, ADR, Arrivals, Departures, In-house, EOD variance status, AI insight tile (suggestions / anomalies); each tile clickable to detail.
- Components:
KpiTile, AiInsightTile, ExceptionsList.
- Offline: First paint from SQLite snapshot; SSE upgrades on reconnect; "Stale projection" badge if > 1h old.
- AI: AI insight tile uses
ai-orchestrator-service /insights; HITL via "View" -> "Acknowledge / Snooze".
- Errors: Reporting projection 5xx -> stale badge; AI tile 5xx -> hidden.
- Loading: Skeleton tiles; first paint <= 200 ms from cache.
- A11y: Each tile is a tab stop with full aria-label (KPI name + value + change %); AI insight tile announces priority.
- RTL: Mirror; numerals localised.
- Perf: First paint <= 200 ms (cache); fresh data <= 1 s p95.
- Telemetry:
frontend.dashboard.viewed; frontend.dashboard.tile_clicked { tileId }.
4.2 KpiDetailDrawer (per-tile drilldown)
- Layout: Time series chart (last 30 days), comparison vs benchmark, source data link.
- Components:
LineChart, BenchmarkPill.
- Offline: Cached per tile.
- AI: None on the chart.
- Errors: Data unavailable -> message.
- Loading: Sub-second.
- A11y: Chart has data table fallback; benchmark pill announced.
- RTL: Mirror.
- Perf: <= 1 s p95.
- Telemetry:
frontend.dashboard.detail_opened { tileId }.
5. State Machine
6. Data Requirements
6.1 Server state
GET /api/v1/dashboard/today?propertyId=...
- SSE:
/api/v1/dashboard/stream?propertyId=...
6.2 Local persistence
- SQLite
dashboard_projection_local (refreshed via SSE).
6.3 Idempotency
7. AI Behavior
| Surface | Purpose | Model | Edge / Cloud | HITL | Provenance | Fallback |
|---|
AiInsightTile | Surface highest-priority insight | ops-insight-v1 | Cloud | Click-through to acknowledge / snooze | Pill | Hidden |
8. Offline Behavior
- First paint from SQLite snapshot.
- "Stale projection" badge if cache > 1h old.
- AI insight tile hidden offline.
9. Error States
| Error | Trigger | UX shown | Recovery | Telemetry |
|---|
PROJECTION_STALE | > 1h since last SSE | Badge: "Projection stale - reconnect for live data" | Reconnect | frontend.dashboard.stale |
AI_INSIGHT_UNAVAILABLE | AI 5xx | Tile hidden | Auto-recover | frontend.dashboard.ai_hidden |
KPI_DATA_UNAVAILABLE | Specific tile fails | Tile shows "n/a" with retry | Auto-retry | error.surfaced { code } |
10. E2E Test Gates
- Composite gate
G-MGR-2: dashboard loads -> tile click -> detail -> back.
- Stale-projection branch.
- AI insight HITL flow.
| Metric | Target |
|---|
| First paint (cache) | <= 200 ms |
| Fresh paint (online) | <= 1 s p95 |
| Detail open | <= 1 s p95 |
12. Accessibility Requirements
- KPI tiles have full aria-labels.
- Chart fallback table available.
- Reduced motion: chart animations disabled.
13. Telemetry
Frontend events
frontend.dashboard.viewed
frontend.dashboard.tile_clicked { tileId }
frontend.dashboard.detail_opened { tileId }
Domain events emitted
melmastoon.reporting.projection.served.v1 (sampled)
14. Success Criteria
- First paint <= 200 ms via SQLite cache.
- Fresh data updated <= 1 s p95 on reconnect.
- AI insight tile follows HITL pattern (no auto-action).
- Offline experience clear (stale badge, no silent failures).
References