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.

Abstract. Desktop Electron apps split privilege across renderer bundles, preload bridges, and main-process IPC handlers. Using REA’s static JavaScript application graph on Notion Desktop 7.6.1’s 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.

Figure 3 · Electron Trust Boundary

Notion Desktop 7.6.1 Clipboard Write IPC Chain

Channel: notion:clipboard:write
tab_browser_view/preload.js
preload.js:1:22764–22828
Renderer

The web editor calls window.__electronApi.clipboard.write(data) without touching Electron internals directly.

tab_browser_view/preload.jsSource
1const clipboardApi = {
2 write: invokerInMain("notion:clipboard:write"),
3};
4// Exposed through contextBridge as window.__electronApi.clipboard
REA Static ObservationRenderer
1api_key: "__electronApi"
2api_status: "dynamic"
3source: preload.js:1:22764–22828
Uses @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

  1. Vercel Labs (2026). “Introducing UI SDK: A library of behaviors to build your components. Made for agents.” github.com/vercel-labs/ui
  2. 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
  3. REA Showcase (2026). “Rebuilding DX-Ball 1.07 from its executable: sound panning reconstruction & 3,205 oracle checks.” rea.tools/showcase/dx-ball
  4. REA Showcase (2026). “How Notion Desktop 7.6.1 copies text and HTML across its Electron preload/IPC bridge.” rea.tools/showcase/notion
  5. 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