Reconnect with resume and gap recovery
Handles stream disconnects by reconnecting with backoff and resuming from the last applied version or cursor. If the server cannot replay the gap, the grid marks the cache stale and resynchronises. Connection state is shown to the user.
Planned. This page shows the specification from issue #180. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
The live stream is connected, and a connection indicator is shown in the status bar.
Expected behavior
Dropping the connection shows 'Reconnecting (attempt 2)'. If the gap is within the replay window, missed deltas are applied. If it is beyond the window, visible blocks are refetched, other blocks are marked stale, and the status reads 'Resynced'. Going offline pauses reconnect attempts until the browser is back online.
Planned API surface
remoteSource.subscribe({ resumeFrom })option: reconnect.backoffoption: reconnect.maxAttemptsSubscribeResult.gap: 'none'|'replayed'|'unrecoverable'api.getConnectionState()event: connectionStateChangedAcceptance criteria
- The resume request carries the last applied version. (pending)
- An unrecoverable gap triggers a refresh with stale marking, and no stale data is presented as live. (pending)
- Connection states are: connected, reconnecting, offline, resyncing, failed. (pending)
- Reaching maxAttempts leads to the 'failed' state, with a manual Reconnect button. (pending)
- Reconnecting never duplicates subscriptions. (pending)