<!-- Canonical page: https://reversedwithai.com/p/rea-notion-clipboard-trace -->
Canonical page: https://reversedwithai.com/p/rea-notion-clipboard-trace

# Traced how Notion Desktop's rich clipboard works through Electron IPC using REA

> Following a Notion copy-paste from the preload bridge to the main process.

An agent used REA's JavaScript analysis on Notion 7.6.1's packaged bundle to follow clipboard writes from the preload bridge through IPC to the main process, and how block structure survives copy and paste.

## Key facts

- Target: Notion Desktop 7.6.1
- Category: Apps
- Platform: Electron
- Tools: REA
- Outcome: Research
- Checks: Source available: yes; Repro steps: not reported; Real hardware: not reported; Verified by others: not reported
- Author: [REA project (morluto)](https://github.com/morluto/rea)
- Added: 2026-10-14
- Updated: 2026-10-14
- Sources reviewed: 2026-10-14 (editor)

## What was done

An REA case study traces how Notion Desktop 7.6.1 copies text and HTML to the system clipboard. A coding agent used REA's JavaScript analysis on Notion's packaged Electron bundle to follow the call from the page-facing API through the preload bridge and IPC to Electron's clipboard writer in the main process.

### How it was done

The example prompt asks the agent to use REA to trace how Notion copies text and HTML and to show the code at each step. REA's `analyze_javascript_application` result on the tab preload located the API exposed to the page (`__electronApi`) and an `ipcRenderer.invoke` call, with source ranges in the minified bundle. The agent opened those locations, found the clipboard member, and resolved the `invokerInMain` wrapper to the channel `notion:clipboard:write`. It then searched the main bundle for that channel and found the handler that checks the sender is a Notion web contents before calling `clipboard.write`.

### Results

The trace covers four steps: page API, preload wrapper, main-process handler and system clipboard. A second finding explains how copied blocks keep their structure: the copied HTML carries a `notionvc` comment with an ID, and Notion stores the block data locally under that ID, restoring it on paste when the IDs match. The page also shows Notion's Markdown parser turning a table into rows and cells, and how offline SQLite work moves to a utility process over a message port. The case study says the link between the exposed method and the main-process handler came from reading wrapper code. The rich-copy and Markdown examples use web assets cached on 13 July 2026, with outputs from saved probes rather than a captured desktop session.

### Status and how to try it

This is a published case study, not software to install. It traces Notion Desktop 7.6.1 from its app.asar using REA 4.1.0. The page reports four steps: the page-facing clipboard API, the preload wrapper, the main-process handler for the notion:clipboard:write channel, and Electron's clipboard.write.

To repeat it, install REA, obtain Notion Desktop 7.6.1's app.asar, run analyze_javascript_application on the tab preload and search the main bundle for the channel name. The page says the link between the exposed method and its handler came from reading wrapper code in the package, not from REA alone. The rich-copy and Markdown examples come from web assets cached on 13 July 2026, their outputs come from saved probes rather than a captured desktop session, and the copied text and ID shown are illustrative. The page gives no date for the desktop analysis.

The page does not name the AI model.

Sources:
- https://rea.tools/showcase/notion/

## Human work and limitations

The link between the exposed method and the main-process handler came from reading wrappers, not a fully automated trace; probes ran extracted modules rather than a live session.

## Sources

- [Write-up](https://rea.tools/showcase/notion/)

Figures are reported by the author and not measured by this site, except the commit history. Entry drafted with AI from the linked sources and checked against them.

Cite as: REA project (morluto) (2026). Traced how Notion Desktop's rich clipboard works through Electron IPC using REA. Reversed with AI. https://reversedwithai.com/p/rea-notion-clipboard-trace
