Skip to main content

Module TreeView

Module TreeView 

Source
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§

EnqueueTreeViewEmit 🔒
Coalesce 30+ Mountain → Sky tree-view/create emits at boot into a single batched payload per 16 ms window. SkyBridge’s listener accepts both single { viewId, extensionId } and batch { views: [...] } shapes (mirrors the command-batch pattern from Vine/Server/Notification/RegisterCommand.rs).
GetTreeChildren
Round-trip a getChildren request to the Cocoon-side TreeDataProvider over Vine. Returns an empty list when no provider is registered or the sidecar call times out (5 s default).
RegisterTreeViewProvider
Register a Cocoon-contributed tree-view provider in ApplicationState and notify Sky via the coalesced EnqueueTreeViewEmit batcher.
ViewIdHandle 🔒
Hash a viewId string into the same u32 that RegisterTreeViewProvider::Fn uses as a registration handle. Lets GetTreeChildren::Fn look up the registered provider without the caller passing the handle through the wire.