Tracing Notion Desktop's Electron Clipboard Bridge
Resolving window.__electronApi.clipboard.write through preload wrappers, ipcRenderer.invoke, and main-process sender checks without source code.
app.asar[1]No native engineElectron ASAR inspection runs purely statically in REA without launching Ghidra, Hopper, or executing the target app.rea.tools/showcase/notion, we trace window.__electronApi.clipboard.write across all four hops without launching a native disassembler.Four-Hop IPC Trace
Select each hop to inspect the exact bundle excerpt, REA static observation, and provenance boundary[2]Evidence boundaryPreload and ipcMain ranges come from Notion Desktop 7.6.1 app.asar; wrapper glue was connected by reading bundled code, distinct from cached web probes.rea.tools/showcase/notion, distinguishing verified desktop archive reads from separate cached web-asset probes.
Notion Desktop 7.6.1 Clipboard Write IPC Chain
The web editor calls window.__electronApi.clipboard.write(data) without touching Electron internals directly.
1const clipboardApi = {2write: invokerInMain("notion:clipboard:write"),3};4// Exposed through contextBridge as window.__electronApi.clipboard
1api_key: "__electronApi"2api_status: "dynamic"3source: preload.js:1:22764–22828
@ui-sdk/react/tabs to walk through each Electron boundary from renderer preload to the sender-checked ipcMain.handle sink.Sender Trust Boundary
Before touching Electron’s native clipboard.write, the main process validates the IPC sender frame via isNotionWebContents(event.sender)[3]Trust gateSender validation runs in the privileged main process prior to any OS clipboard mutation, blocking arbitrary renderer frames.rea.tools/showcase/notion. Untrusted frames are rejected before any OS clipboard mutation occurs.
Notes & References
- Vercel Labs (2026). “Introducing UI SDK: A library of behaviors to build your components. Made for agents.” github.com/vercel-labs/ui
- REA Project (2026). “Reverse Engineer Anything: One MCP for reverse engineering across binaries, applications, and runtime behavior (v6.8.0, 229 tools).” github.com/morluto/rea
- REA Showcase (2026). “Rebuilding DX-Ball 1.07 from its executable: sound panning reconstruction & 3,205 oracle checks.” rea.tools/showcase/dx-ball
- REA Showcase (2026). “How Notion Desktop 7.6.1 copies text and HTML across its Electron preload/IPC bridge.” rea.tools/showcase/notion
- Editorial craft references: SID-2 Technical Report (three-column reading grid, inline figure toggles, margin sidenotes) and Architect Labs Frostbite (editorial left rail, serif display headlines, cobalt telemetry). sid.ai & architectlabs.com