Skip to main content

Module Notification

Module Notification 

Source
Expand description

§Vine::Server::Notification

Cocoon → Mountain notification handlers with non-trivial logic. Pure relay atoms (single RelayToSky::Fn call, single EmitToRenderer, or single dev_log!) are inlined directly in the Mountain dispatcher rather than given their own file.

Every handler here has at least one of:

  • Payload reshape / field extraction
  • Channel-drain coalescer (OnceLock flusher)
  • Multiple side effects
  • Non-obvious sky-event mapping

Modules§

ApplyTextEdits
Cocoon → window.applyTextEdits notification. Emitted when an extension calls editor.edit(editBuilder => {...}). Cocoon’s TextEditor shim collects the edits and sends them here. Mountain relays sky://editor/apply-text-edits so Sky can apply them via ICodeEditorService.listCodeEditors()editor.executeEdits(...).
DebugLifecycle
Cocoon → debug.addBreakpoints / debug.removeBreakpoints / debug.consoleAppend notifications. Fans on sky://debug/<suffix> so the Sky-side debug view picks up breakpoint changes and console output from the extension’s vscode.debug.* surface. For breakpoint mutations specifically, also fans back to Cocoon so vscode.debug.onDidChangeBreakpoints subscribers in OTHER extensions observe the change. Without this round-trip, only the extension that called addBreakpoints/removeBreakpoints knows about its own write.
DecorationTypeLifecycle
Cocoon window.createTextEditorDecorationType / window.disposeTextEditorDecorationType notifications. Forwards the payload on sky://decoration/<suffix> as a batch; Sky demultiplexes back to per-decoration cel:decoration:* CustomEvents.
DisposeStatusBarItem
Cocoon → disposeStatusBarItem notification. Forwarded onto sky://statusbar/dispose-entry so the Sky shim removes the DOM node.
OpenExternal
Cocoon openExternal notification - extension called vscode.env.openExternal(uri). Delegates to the platform default handler via the opener crate. Fire-and-forget; success/failure is logged but not surfaced back to the extension.
OutputAppendLine
Cocoon output.appendLine notification. Appends text to the named output channel; we suffix the newline here so the downstream sky://output/append listener stays a single append code path (no dedicated appendLine listener in Sky).
OutputChannelAppend
Cocoon outputChannel.append notification. Twin of output.append; see OutputCreate.rs for the duplicate-wire rationale.
OutputChannelCoalesce
Per-channel coalescing buffer for outputChannel.append notifications.
OutputChannelHide
Cocoon outputChannel.hide notification. Forwards to Sky as sky://output/show { visible: false, channel } so the workbench panel can dismiss the channel via the same handler that processes show() calls.
OutputReplace
Cocoon output.replace notification - swap the channel’s entire contents. Mapped to clear + append since Sky has no dedicated sky://output/replace listener yet.
ProgressEnd
Cocoon progress.end notification. Fires once per vscode.window.withProgress(...) call when the task settles. Forwarded onto sky://notification/progress-end.
ProgressReport
Cocoon progress.report notification.
ProgressStart
Cocoon progress.start notification. Fires at the top of every vscode.window.withProgress(...) call. Normalised onto sky://notification/progress-begin.
RegisterCommand
Cocoon → registerCommand notification. Two side effects per call:
RegisterLanguageProvider
Cocoon → register_* / register_*_provider notification dispatcher.
RegisterScmProvider
Cocoon → register_scm_provider notification.
RegisterScmResourceGroup
Cocoon → register_scm_resource_group notification.
SecurityIncident
Cocoon security.incident notification - Cocoon-side security policy flagged a breach (extension violated permission set, blocked filesystem access, etc.). Land has no central security dashboard yet; the atom surfaces the incident via dev_log! and re-emits on sky://security/incident for future listeners.
SetLanguageConfiguration
Cocoon → set_language_configuration notification. Carries brackets / indent rules / word-pattern / comments. Forwarded on sky://language/configure; Monaco’s config side reads the payload and calls monaco.languages.setLanguageConfiguration(...).
SetStatusBarText
Cocoon → setStatusBarText notification. Pure text-only fast path for vscode.window.setStatusBarMessage(...). Distinct from the typed statusBar.update notification (which carries colour/tooltip/command fields). Forwards onto sky://statusbar/set-entry.
SetTextEditorDecorations
Cocoon → window.setTextEditorDecorations notification. Channel-drain batching: ~5-200 calls per extension per second during scroll; one renderer event per frame (16 ms window, drain stragglers). Uses Arc<dyn RendererEmitter> captured once from VineHost::RendererEmitter() so the drain task never holds a reference to the full host across await points.
StatusBarLifecycle
Cocoon → statusBar.update / statusBar.dispose notifications. Derives the Sky event name from the wire method suffix and emits on sky://statusbar/<suffix>. Canonical prefix is sky://statusbar/ (no hyphen) to match every other emit site in the statusbar group.
StatusBarMessage
Cocoon → statusBar.message notification. Emitted when an extension calls vscode.window.setStatusBarMessage (one-shot text, optional auto-hide). Canonical channel is sky://statusbar/set-message.
Support
Vine::Server::Notification::Support
TerminalLifecycle
Cocoon → terminal.sendText / terminal.show / terminal.hide / terminal.dispose notifications.
UnregisterCommand
Cocoon → unregisterCommand notification. Removes the proxied CommandHandler from the embedder’s dispatch registry so subsequent commands.executeCommand no longer routes back to the extension. Also notifies Sky so the workbench command-service view and Mountain’s registry stay in sync when an extension disposes a command.
UnregisterScmProvider
Cocoon → unregister_scm_provider notification. Emitted when vscode.scm.createSourceControl(...).dispose() fires. Resolves the provider handle: uses the explicit handle field when Cocoon sends it, otherwise recomputes the DJB-31 hash of scmId that RegisterScmProvider used when it originally registered the provider (necessary because Cocoon’s dispose path only carries the string id).
UpdateScmGroup
Cocoon → update_scm_group notification. Fire-and-forget resource-state update for an SCM group. Two side effects:
WebviewDispose
Cocoon webview.dispose notification - extension disposed a webview panel or the user closed the tab. Sky’s webview shim listens on sky://webview/dispose and tears down the DOM container and unregisters the handle.
WebviewLifecycle
Cocoon → webview.setTitle / webview.setIconPath / webview.setHtml / webview.postMessage / webview.updateView / webview.viewState / webview.dispose notifications.
WebviewPostMessage
Cocoon webview.postMessage notification - extension called WebviewPanel.webview.postMessage(...). Stock VS Code delivers this as a DOM message event inside the webview iframe; Land emits on sky://webview/postMessage and lets the Sky bridge relay into the specific webview DOM container keyed on { handle, message }.
WindowCreateTerminal
Cocoon → window.createTerminal notification. Spawns a PTY via VineHost::CreateTerminal, then emits sky://terminal/create with the provider-minted { id, pid, name }.
WindowShowMessage
Cocoon window.showMessage notification - fire-and-forget toast. Distinct from Window.ShowMessage (capitalised, round-trip request); this is the notification form that does not wait for a button selection.