# Desktop proof

Both commits were built separately with `vp run --filter @t3tools/desktop build` and run as real Linux Electron apps under `headless-desktop`, with `--no-sandbox --disable-gpu`, separate XDG_CONFIG_HOME and T3CODE_HOME directories, and T3CODE_DEV_SEED=0. Each used its own Vite dev:web renderer and its bundled server. Both windows were 1600x1000, light theme. Onboarding was completed without importing history.

`seed-proof.cjs` adds an empty synthetic git project through the real CLI and configures the repository's recorded Replay (dev) provider. The desktop bundled server does not register Replay automatically. Set VITE_DEV_SERVER_URL to the matching Vite renderer, T3CODE_PORT to its backend port, and T3CODE_ENVIRONMENT_LABEL=Proof. Launch Electron with a unique remote-debugging port.

Open the project's new draft and its right-panel Browser before running the driver. With the Electron display's DISPLAY and XAUTHORITY in the environment, from the checkout:

```
node desktop-proof.cjs <remote-debugging-port> <before-or-after> <new-output-directory>
```

Keep `guest.cjs` alongside the driver. It sends trusted CDP mouse and keyboard input to the real preview webview, including the picker's closed shadow-root textarea. The driver owns the local fixture page on port 4617, records the actual desktop with ffmpeg, and waits for equal pixel captures 500ms apart before retaining each still.

The sequence is long-URL annotation first send, short-URL control, then long-URL follow-up. Every note is “Make this bigger” and every selection is the page's real p#target. The long URL is 2129 characters. The driver opens chip details before sending and after successful sends. Runs are interrupted when a Stop generation button is visible; otherwise Replay finishes its recorded response.

`inspect-records.py <database>` reads the isolated server's SQLite database read-only and prints only synthetic annotation metadata lengths, note, target and screenshot-reference presence. It does not dump the database.
