core/tree/snapshot library

Classes

UiNode
A node as exposed by the SDK's tree pipeline.
UiOverlay
Durable identity for one captured modal surface. Live nodes remain flat; the cache groups their structure under this key, matching native SDKs.
UiSnapshot
The SDK's single source of truth for the UI at one instant in time.

Constants

kSubtreeTextMaxChars → const int
Longest subtree_text sent on the wire. Generous on purpose: the backend's subtree rung is a token-bag containment over the TIGHTEST container, and its owner-label pass reads the first six tokens, so a row or card is never near this; only a tall list that is not quite page-level is cut, at a token boundary so no partial token enters the backend's bag. A space-free run (one giant token) is the exception: it is hard-cut at the cap — never between the halves of a UTF-16 surrogate pair.
kSubtreeTextOmitCoverage → const double
Viewport coverage at or above which a node's subtree_text is left off the wire (see UiNode.coversViewport).

Functions

capSubtreeText(String s) → String
tokens is NOT sent: the backend rebuilds it as normalized_text.split(' ') minus empties — byte-identical to tokenise — whenever the key is absent.