Skip to content
SumOfficeSumOfficeSumOffice

Events between the application and the editor

The full list: seven events from the application to the editor and eleven back, plus six that appeared after the document — each with its signature and channel name.

From the application to the editor — 7 events

Section titled “From the application to the editor — 7 events”
onDocumentSessionSnapshot(callback: (snapshot: ShellDocumentSessionSnapshot) => void): () => void

Channel: fastdoc-shell:document-session-snapshot

onMenuCommand(callback: (command: MenuCommand) => void): () => void

Channel: fastdoc-shell:menu-command

onSaveBeforeClose(callback: () => void): () => void

Channel: fastdoc-shell:save-before-close

onSaveBeforeCloseFailed(callback: (payload: { message: string }) => void): () => void

Channel: fastdoc-shell:save-before-close-failed

onSaveBeforeDocumentSwitch(callback: (request: { requestId: number }) => void): () => void

Channel: fastdoc-shell:save-before-document-switch

onStateChanged(callback: (state: ShellBridgeState) => void): () => void

Channel: fastdoc-shell:state-changed

onSystemPaste(callback: (payload: SystemPastePayload) => void): () => void

Channel: fastdoc-shell:system-paste

From the editor to the application — 11 events

Section titled “From the editor to the application — 11 events”
completeSaveBeforeClose(payload: { saved: boolean; message?: string | null }): void

Channel: fastdoc-shell:save-before-close-result

completeSaveBeforeDocumentSwitch(result: { requestId: number; saved: boolean; savedPath: string | null; errorMessage: string | null; }): void

Channel: fastdoc-shell:document-switch-save-result

notifyCanonicalEditDropped(payload: { code: string; requestId: string; commandType: string; }): void

Channel: fastdoc-shell:canonical-edit-dropped

notifyCurrentDocumentTruthViewerReady(payload: { availability: string; fixtureId: string | null; blockedStatesVisible: boolean; forbiddenClaimsVisible: boolean; unavailableStateVisible: boolean; genericFixtureListVisible: boolean; }): void

Channel: fastdoc-shell:current-document-truth-viewer-ready

notifyDocumentRendered(renderedPath: string | null): void

Channel: fastdoc-shell:document-rendered

notifyEditKeyDropped(payload: { code: string; inputType: string; selectionShape: string; inputRoute: string; contextRefusal: string; pressIndex: number; }): void

Channel: fastdoc-shell:edit-key-dropped

notifyPageHydrationDropped(payload: { code: string; stage: string }): void

Channel: fastdoc-shell:page-hydration-dropped

notifyPersistentSaveRefused(payload: { code: string; requestId: string; saveAs: boolean; }): void

Channel: fastdoc-shell:persistent-save-refused

notifyRendererReady(): void

Channel: fastdoc-shell:renderer-ready

notifySmokeCheckpoint(checkpoint: string, payload?: { screenshotDataUrl?: string | null; screenshots?: Array<{ name?: string | null; dataUrl?: string | null }>; telemetry?: unknown; reserveCyclesCompleted?: number; reserveElapsedMs?: number; reserveRichPayloadBytes?: number; }): void

Channel: fastdoc-shell:smoke-checkpoint

notifyUnsavedState(hasUnsavedChanges: boolean): void

Channel: fastdoc-shell:unsaved-state

Subscription lifecycle. Every on* method returns an unsubscribe function — call it when you remove the component or close the window, or the handlers will keep hanging around.

These channels are declared in the contract and in the desktop SumDoc preload, but didn’t make it into the document this reference is built from. Three go from the application to the editor, three go back.

onCanonicalSceneRefreshed(callback: (event: ShellCanonicalSceneRefreshed) => void): () => void

Channel: fastdoc-shell:canonical-scene-refreshed — the scene changed for a reason other than this person’s action: a peer’s edit or a deferred read of projections.

onDocumentPatch(callback: (patch: ShellDocumentPatch) => void): () => void

Channel: fastdoc-shell:document-patch — a delta frame for a peer’s edit instead of the whole state.

onProbeUnsavedState(callback: (request: { requestId: number }) => void): () => void

Channel: fastdoc-shell:probe-unsaved-state — the application asks whether there is anything unsaved.

declareRendererCapabilities(capabilities: ShellRendererCapabilities): void

Channel: fastdoc-shell:renderer-capabilities — what the page can accept; declared before notifyRendererReady.

notifyDocumentPatchOutcome(outcome: ShellDocumentPatchOutcome): void

Channel: fastdoc-shell:document-patch-outcome — whether the page applied the delta frame, and why not.

completeUnsavedStateProbe(result: { requestId: number; unsaved: boolean }): void

Channel: fastdoc-shell:unsaved-state-probe-result — the reply to the unsaved-state probe, by requestId.

Documentation assistant

Answers are assembled from the documentation and may be inaccurate — check the sources.