Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

05 - Screen Inventory (Health Module)

Every screen of the Health module, its intent, route, composition, states, permissions, platform behavior and events. Authoritative components in 00-shared/03; this file enumerates which ones each screen uses with module specifics. The human-facing screens are (proposed) - the implemented backend surface is a single public endpoint with no UI (health.controller.ts:27-37).


Legend

States = idle / loading / success / empty / error(offline, rate, invalid) / disabled / permission. Analytics events follow {module}.{screen}.{action} (proposed; SDK open - 00-shared/10 §8).


1. App Health Screen (/ops/health) (proposed)

FieldDetail
PurposeOps overview: are API, DB, Redis, Queues, Storage reachable right now?
Entryops menu, support hot-link, incident deep link /ops/health
Exitback to ops zone; no downstream screens (read-only surface)
Data sourceGET /api/v1/health - data.info + data.error (health.controller.ts:27-37, health.controller.spec.ts:21-36)
CompositionAppBar "App Health" → overall status banner → 5 status cards (API, DB, Redis, Queues, Storage) → last-check time + retry button
WidgetsAppCard, AppBadge, AppSkeleton, AppEmptyState, AppOfflineBanner, AppButton (00-shared/03); module widgets StatusCard, StatusDot, PendingJobsTile (07)
Statesloading (skeletons); success all-up; success partial (red culprit cards); error (network/timeout - offline banner + retry); rate-limited (429 countdown); disabled (poll paused when app backgrounded)
Pollingauto-poll every 30 s while foregrounded (13 §2); manual retry always available
Analyticshealth.screen.open, health.screen.poll_success, health.screen.poll_failure(503), health.retry.tap
Adaptivephone single column; tablet/desktop 2-column card grid; landscape scroll
a11yper-card semantics label "DB: up"; overall banner as live region on state change (00-shared/09)
Motioncard flash on state change (m-fast); banner collapse animation (00-shared/08)

2. Incident Detail Sheet (per failed card) (proposed)

FieldDetail
PurposeShow what the endpoint knew about the failure - no extra API call
Entrytap a red card
Contentfailed key (mongodb/redis/storage/bullmq), data.error.<key> payload, Queues card shows pendingJobs (bullmq-health.indicator.ts:30), last-check time
Exitdismiss sheet
Statesstatic - renders the already-fetched payload; no network
a11ysheet focus-trapped; content readable by screen reader
NoteFor redis failures the payload carries no detail (indicator throws bare on failure, redis-health.indicator.ts:17-22) - show "no additional detail reported"

3. (No other screens)

  • No forms, no list screens, no settings screen. The module is intentionally one screen + one detail sheet (proposed).
  • Liveness/readiness screens do not exist; the split endpoints are (planned) (docs/user-flows/END_TO_END_USER_FLOWS.md:738-740), and even then they are probe endpoints, not screens.

Shared components used

AppCard, AppButton, AppBadge, AppSkeleton, AppEmptyState, AppOfflineBanner, AppSnackbar, AppBanner. Module-specific: StatusCard, StatusDot, PendingJobsTile, LastCheckedLabel - defined in 07_Component_Library.md.

Analytics events (proposed)

health.screen.{open,poll_success,poll_failure}, health.retry.tap, health.card.detail_open (all proposed).

Keyboard, landscape, tablet, desktop

  • Scrollable single column on phone; 2-column grid ≥ 700 dp (00-shared/11 responsive rules).
  • No text input anywhere - no keyboard handling needed.
  • Retry button reachable via focus traversal; cards are buttons for screen readers.