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 (WS / Realtime Module)

The realtime layer has no standalone screens — it manifests as connection state and live-update behavior on existing screens. This inventory is UI-context only: it enumerates every surface where realtime is visible, plus the one proposed debug screen. Authoritative components in 00-shared/03; this file names which each surface uses.

Legend — States: idle / connecting / connected / reconnecting / offline(disconnected) / error(auth) / stale-data. Analytics: {module}.{screen}.{action} (proposed; SDK open — 00-shared/10 §8).


1. Global Connection Status Indicator (on every authenticated screen)

FieldDetail
PurposeShow whether live updates are flowing; never block work
LocationTop app bar trailing slot / app-level banner region (below app bar on mobile)
Entryauto with app shell; state from socket lifecycle
Exitnone (persistent); tap → status sheet (§4) on desktop
ComponentsAppRealtimeStatusDot, AppConnectionBanner (offline only), AppSnackbar
Statesconnected (dot, tooltip "Live"), connecting, reconnecting (pulsing dot), offline (banner + dot), error-auth (banner: "Session expired — reconnecting")
Analyticsapp.ws.{connect,reconnect,offline,error} (proposed)
a11ystatus announced via live region on state change; dot carries semantic label, never color-only
Motionm-fast fade/pulse (00-shared/08)

2. Notification Bell + Toast (on every authenticated screen)

FieldDetail
PurposeSurface notification.created without navigating
Entryapp shell
Behaviorbell badge increments on event; toast (snackbar) shows for high-priority types only
Exittap bell → notifications list (REST); tap toast → target route
ComponentsAppBadge, AppSnackbar, AppListTile
Statesidle, toast-expanded, badge-count overflow (99+)
Analyticsnotif.received.{type}, notif.tap (proposed)

3. Live-updating lists & dashboard tiles (module screens)

FieldDetail
PurposeRefresh list rows / KPI tiles in place when a matching event arrives
Host screensDashboard overview, Fees, Attendance, Homework, Results, CRM (per module design docs)
PatternAppLiveList wrapper (component in 07); event → update row by id, else schedule REST refetch
Statesidle, live-updating (row flash m-fast), stale (offline banner, AppSkeleton for loading)
Rulenever mutate a list while the user is editing within it (see 10 §2)

4. Connection Status Detail Sheet (proposed)

FieldDetail
PurposeShow user-facing diagnostics: state, server time delta, last event received
Entrytap status dot (desktop) / long-press (mobile)
Contentstate chip, "last event: {eventType} {occurredAt}", "reconnect attempt #n", settings shortcut
ComponentsAppBottomSheet, AppListTile, AppChips
Analyticsapp.ws.status_open (proposed)

5. Realtime Admin Debug View /admin/realtime (proposed)

FieldDetail
PurposeIT/admin verification: see the event stream and connection health for the tenant
Route/admin/realtime (admin-gated; rbac perms — none exist yet for ws, see 12)
Contentlive event log (eventType, occurredAt, payload size), socket count, room list, fan-out errors; clear/pause controls (client-side pause only)
ComponentsAppEventLog, AppDataTable, AppSegmentedButton
Stateslive, paused, empty ("waiting for events…"), filtered by eventType
Analyticsadmin.ws.{open,pause,filter} (proposed)
NoteServer-side counterpart (per-socket visibility) is forward-looking

Component usage summary

AppRealtimeStatusDot, AppConnectionBanner, AppLiveList, AppEventLog, AppBadge, AppSnackbar, AppBottomSheet, AppListTile, AppSkeleton, AppEmptyState. Module-specific: AppRealtimeStatusDot and AppLiveList are defined in 07_Component_Library.md.

Keyboard / landscape / tablet

  • Status dot + banner are fixed-position surfaces: safe-area inset aware, never overlap scroll content; landscape keeps banner ≤ 1 line.
  • Debug view: tablet/desktop two-column (log + metrics); mobile single column.