Expand description
Tree-view-domain handlers for CocoonService.
RegisterTreeViewProvider::Fn, GetTreeChildren::Fn, plus private
helpers EnqueueTreeViewEmit (16 ms emit batcher) and ViewIdHandle
(viewId โ registration u32).
Modulesยง
- Enqueue
Tree ๐View Emit - Coalesce 30+ Mountain โ Sky
tree-view/createemits at boot into a single batched payload per frame. Uses the channel-drain pattern: a long-lived flusher wakes on first item, drains immediately, sleeps one frame (16 ms), drains stragglers, then emits one{ views: [...] }batch. Zero spawns per call; sub-millisecond wake latency. - GetTree
Children - Round-trip a
getChildrenrequest to the Cocoon-sideTreeDataProviderover Vine. Returns an empty list when no provider is registered or the sidecar call times out (5 s default). - Register
Tree View Provider - Register a Cocoon-contributed tree-view provider in
ApplicationStateand notify Sky via the coalescedEnqueueTreeViewEmitbatcher. - View
IdHandle ๐ - Hash a
viewIdstring into the sameu32thatRegisterTreeViewProvider::Fnuses as a registration handle. LetsGetTreeChildren::Fnlook up the registered provider without the caller passing the handle through the wire.