Interface: ConnectionApi

Optional connection diagnostics for indicators and recovery-aware UI.

Status starts as disconnected, and reading it does not start readiness. Register Plot.onLifecycleChange, then call Plot.ready() to begin startup. Status changes to connected when Plot installs the complete ready state, just before initial snapshot callbacks and readiness resolution. Afterward, cached synchronized reads remain available during a recoverable disconnect but may be stale; Plot attempts recovery automatically.

Properties

isConnected

readonly isConnected: boolean

Whether status is connected.


recovery

readonly recovery: ConnectionRecoveryInfo | null

Immutable recovery details, or null before the first complete installation. Updated before Plot.onLifecycleChange reports connected and retained while disconnected. Ordinary state changes leave it unchanged. A reliable replay gap updates these diagnostics without firing a lifecycle callback.


status

readonly status: ConnectionStatus

Whether Plot can currently exchange synchronized realtime data. Available before readiness. A disconnected status may be temporary or terminal, so use operation errors to decide what recovery is possible.