Skip to main content
zerotal

Documentation


Documentation / @zerotal/flow / index / PatchFrame

Interface: PatchFrame

Defined in: flow/src/types.ts:116

Patch frame sent by the server to the client after a successful action.

The snapshot travels as a delta by default: only changed fields (dataDelta) and removed keys (dataRemoved) are sent, alongside the new memo and full-snapshot checksum. The client rebuilds the full snapshot from its prior copy + the delta (an exact reconstruction, since the server diffed against the client's own snapshot). The legacy snapshot field remains as a full fallback. html is omitted when the re-render is byte-identical to the last patch on this connection (HTML suppression).

Properties

type

type: "patch"

Defined in: flow/src/types.ts:117


component

component: string

Defined in: flow/src/types.ts:118


html?

optional html?: string

Defined in: flow/src/types.ts:119


memo?

optional memo?: SnapshotMemo

Defined in: flow/src/types.ts:121


checksum?

optional checksum?: string

Defined in: flow/src/types.ts:122


dataDelta?

optional dataDelta?: SnapshotData

Defined in: flow/src/types.ts:123


dataRemoved?

optional dataRemoved?: string[]

Defined in: flow/src/types.ts:124


snapshot?

optional snapshot?: Snapshot

Defined in: flow/src/types.ts:126


scripts?

optional scripts?: string[]

Defined in: flow/src/types.ts:127


errors?

optional errors?: Record<string, string[]>

Defined in: flow/src/types.ts:128


title?

optional title?: string

Defined in: flow/src/types.ts:129


actionError?

optional actionError?: boolean

Defined in: flow/src/types.ts:131

True when the action (or a rejected client write) failed — drives showOnError.


partial?

optional partial?: boolean

Defined in: flow/src/types.ts:137

True for a mid-@task streaming patch: the client applies the DOM/snapshot but keeps the triggering action's loading state on and does not release the per-component send queue — only the final (non-partial) patch does. Absent on ordinary patches.