Skip to main content

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

#EntryNotes
1Default Manager landingDefault
2"Daily digest" notification deep linkPre-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

  • Read-only journey.

7. AI Behavior

SurfacePurposeModelEdge / CloudHITLProvenanceFallback
AiInsightTileSurface highest-priority insightops-insight-v1CloudClick-through to acknowledge / snoozePillHidden

8. Offline Behavior

  • First paint from SQLite snapshot.
  • "Stale projection" badge if cache > 1h old.
  • AI insight tile hidden offline.

9. Error States

ErrorTriggerUX shownRecoveryTelemetry
PROJECTION_STALE> 1h since last SSEBadge: "Projection stale - reconnect for live data"Reconnectfrontend.dashboard.stale
AI_INSIGHT_UNAVAILABLEAI 5xxTile hiddenAuto-recoverfrontend.dashboard.ai_hidden
KPI_DATA_UNAVAILABLESpecific tile failsTile shows "n/a" with retryAuto-retryerror.surfaced { code }

10. E2E Test Gates

  • Composite gate G-MGR-2: dashboard loads -> tile click -> detail -> back.
  • Stale-projection branch.
  • AI insight HITL flow.

11. Performance Requirements

MetricTarget
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