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
Section titled “onDocumentSessionSnapshot”onDocumentSessionSnapshot(callback: (snapshot: ShellDocumentSessionSnapshot) => void): () => voidChannel: fastdoc-shell:document-session-snapshot
onMenuCommand
Section titled “onMenuCommand”onMenuCommand(callback: (command: MenuCommand) => void): () => voidChannel: fastdoc-shell:menu-command
onSaveBeforeClose
Section titled “onSaveBeforeClose”onSaveBeforeClose(callback: () => void): () => voidChannel: fastdoc-shell:save-before-close
onSaveBeforeCloseFailed
Section titled “onSaveBeforeCloseFailed”onSaveBeforeCloseFailed(callback: (payload: { message: string }) => void): () => voidChannel: fastdoc-shell:save-before-close-failed
onSaveBeforeDocumentSwitch
Section titled “onSaveBeforeDocumentSwitch”onSaveBeforeDocumentSwitch(callback: (request: { requestId: number }) => void): () => voidChannel: fastdoc-shell:save-before-document-switch
onStateChanged
Section titled “onStateChanged”onStateChanged(callback: (state: ShellBridgeState) => void): () => voidChannel: fastdoc-shell:state-changed
onSystemPaste
Section titled “onSystemPaste”onSystemPaste(callback: (payload: SystemPastePayload) => void): () => voidChannel: fastdoc-shell:system-paste
From the editor to the application — 11 events
Section titled “From the editor to the application — 11 events”completeSaveBeforeClose
Section titled “completeSaveBeforeClose”completeSaveBeforeClose(payload: { saved: boolean; message?: string | null }): voidChannel: fastdoc-shell:save-before-close-result
completeSaveBeforeDocumentSwitch
Section titled “completeSaveBeforeDocumentSwitch”completeSaveBeforeDocumentSwitch(result: { requestId: number; saved: boolean; savedPath: string | null; errorMessage: string | null; }): voidChannel: fastdoc-shell:document-switch-save-result
notifyCanonicalEditDropped
Section titled “notifyCanonicalEditDropped”notifyCanonicalEditDropped(payload: { code: string; requestId: string; commandType: string; }): voidChannel: fastdoc-shell:canonical-edit-dropped
notifyCurrentDocumentTruthViewerReady
Section titled “notifyCurrentDocumentTruthViewerReady”notifyCurrentDocumentTruthViewerReady(payload: { availability: string; fixtureId: string | null; blockedStatesVisible: boolean; forbiddenClaimsVisible: boolean; unavailableStateVisible: boolean; genericFixtureListVisible: boolean; }): voidChannel: fastdoc-shell:current-document-truth-viewer-ready
notifyDocumentRendered
Section titled “notifyDocumentRendered”notifyDocumentRendered(renderedPath: string | null): voidChannel: fastdoc-shell:document-rendered
notifyEditKeyDropped
Section titled “notifyEditKeyDropped”notifyEditKeyDropped(payload: { code: string; inputType: string; selectionShape: string; inputRoute: string; contextRefusal: string; pressIndex: number; }): voidChannel: fastdoc-shell:edit-key-dropped
notifyPageHydrationDropped
Section titled “notifyPageHydrationDropped”notifyPageHydrationDropped(payload: { code: string; stage: string }): voidChannel: fastdoc-shell:page-hydration-dropped
notifyPersistentSaveRefused
Section titled “notifyPersistentSaveRefused”notifyPersistentSaveRefused(payload: { code: string; requestId: string; saveAs: boolean; }): voidChannel: fastdoc-shell:persistent-save-refused
notifyRendererReady
Section titled “notifyRendererReady”notifyRendererReady(): voidChannel: fastdoc-shell:renderer-ready
notifySmokeCheckpoint
Section titled “notifySmokeCheckpoint”notifySmokeCheckpoint(checkpoint: string, payload?: { screenshotDataUrl?: string | null; screenshots?: Array<{ name?: string | null; dataUrl?: string | null }>; telemetry?: unknown; reserveCyclesCompleted?: number; reserveElapsedMs?: number; reserveRichPayloadBytes?: number; }): voidChannel: fastdoc-shell:smoke-checkpoint
notifyUnsavedState
Section titled “notifyUnsavedState”notifyUnsavedState(hasUnsavedChanges: boolean): voidChannel: 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.
Appeared after the document — 6 events
Section titled “Appeared after the document — 6 events”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
Section titled “onCanonicalSceneRefreshed”onCanonicalSceneRefreshed(callback: (event: ShellCanonicalSceneRefreshed) => void): () => voidChannel: 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
Section titled “onDocumentPatch”onDocumentPatch(callback: (patch: ShellDocumentPatch) => void): () => voidChannel: fastdoc-shell:document-patch — a delta frame for a peer’s edit instead of the whole state.
onProbeUnsavedState
Section titled “onProbeUnsavedState”onProbeUnsavedState(callback: (request: { requestId: number }) => void): () => voidChannel: fastdoc-shell:probe-unsaved-state — the application asks whether there is anything unsaved.
declareRendererCapabilities
Section titled “declareRendererCapabilities”declareRendererCapabilities(capabilities: ShellRendererCapabilities): voidChannel: fastdoc-shell:renderer-capabilities — what the page can accept; declared before notifyRendererReady.
notifyDocumentPatchOutcome
Section titled “notifyDocumentPatchOutcome”notifyDocumentPatchOutcome(outcome: ShellDocumentPatchOutcome): voidChannel: fastdoc-shell:document-patch-outcome — whether the page applied the delta frame, and why not.
completeUnsavedStateProbe
Section titled “completeUnsavedStateProbe”completeUnsavedStateProbe(result: { requestId: number; unsaved: boolean }): voidChannel: fastdoc-shell:unsaved-state-probe-result — the reply to the unsaved-state probe, by requestId.