Realtime / WebSocket Surface
All hooks connect via Socket.IO to ${VITE_WEBSOCKET_SERVICE_URL}/realtime using JWT handshake auth with localStorage.auth_token.
| Hook | Page(s) | Join Payload | Server Event |
|---|---|---|---|
| useRealtimeDisplayStatus | Displays list, display detail | { display_id } (optional) | mrd:display.status.updated |
| useRealtimeWebhooks | Display detail, physical-space detail | { display_id } or none | mrd:webhook.received, mrd:physical-space.webhook.processed |
| useRealtimeIotVerification | IoT Adapters list | { iot_gateway_id } (optional) | mrd:gateway.status.updated |
| useRealtimeAdapters | Physical space detail (Devices) | { physical_space_id } | adapter status events |
Degraded Mode
If the WebSocket service is unreachable, the app remains usable. Manual refresh / triggerHardRefresh() covers list re-fetch on mutations.