Skip to content

js-bao-wss-client


js-bao-wss-client / DocumentSnapshotLoadEvent

Interface: DocumentSnapshotLoadEvent ​

How a large document's base snapshot load is going.

A cold open of a large document streams a base of up to gigabytes before the document is usable, which can take minutes. An app with nothing to show for that is indistinguishable from one that has hung, so the load reports itself: started once the manifest is in hand (which is where totalRows comes from, so a progress bar exists before the first chunk lands), progress per chunk, model as each model becomes queryable, and loaded at the end.

Properties ​

chunks ​

chunks: number


chunksReused? ​

optional chunksReused?: number

Chunks a convergence kept rather than fetched, on the loaded phase of a "converge" load. The saving the whole design exists for.


documentId ​

documentId: string


epoch ​

epoch: number

The epoch the snapshot is a base for.


mode? ​

optional mode?: "load" | "converge"

What this load IS.

"load" installs a base whole — a cold start, or a rebuild. "converge" replaces only the ranges a bulk load touched and keeps the rest, which is why it also reports chunksReused.


model? ​

optional model?: string

The model the event concerns, when it concerns one.


phase ​

phase: "started" | "progress" | "model" | "loaded"


rows ​

rows: number


totalChunks ​

totalChunks: number


totalRows ​

totalRows: number

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30