# Desktop panel-close proof

Built and ran the real Linux Electron app separately at base 798c7b24eb2bca2ed7c6d7bf5a5854c0a012e93c and head 04c0b06b347bca9940ce2faae78ce2c74b0991e1.

Each checkout used its own fresh server database and Electron profile. The synthetic project was an empty git repository named Preview proof. `seed.cjs` creates an idle thread through the real authenticated WebSocket RPC; no model is called. Both app windows are 1440×900, light theme. The driver serves the synthetic Hello repro page at http://localhost:8765/.

## Files

- `desktop-driver.cjs CHECKOUT OUTPUT_DIRECTORY`: Run under `headless-desktop node`. Launches that checkout's bundled Electron main process with no sandbox and GPU disabled. Sets isolated state and a synthetic environment label. Exposes a local-only automation endpoint at port 19000.
- `seed.cjs CHECKOUT PROJECT_ID`: Run with Node after adding the synthetic project through `node apps/server/src/bin.ts project add PROJECT_DIRECTORY --title 'Preview proof' --base-dir .t3` from the checkout. Creates the thread, printing its id.
- `flow.js`: Send as the POST body to http://127.0.0.1:19000. It drives Settings → Browser → Auto-show floating preview, opens the seeded thread's Browser panel, navigates to the local page, and closes the panel. Records desktop video and stable screenshots; writes observed float counts. For the ON control first send `globalThis.proofAutoShow=true;return true;` to the automation endpoint.
- `explicit-float.js`: Additional head check with Auto-show OFF, a loaded panel and Float preview over chat available. Clicks that explicit action, reopens the panel, and closes it, recording that the same float source remains selected.

Before sending `flow.js`, set `globalThis.proofThreadUrl` through the automation endpoint to the desktop URL `t3code://app/#/ENVIRONMENT_ID/THREAD_ID` and navigate there. The environment id comes from the app server's `/.well-known/t3/environment`, with the server origin read from the checkout's `.t3/userdata/server-runtime.json`. Wait for the seeded thread heading before starting the flow.

Build each checkout with `vp i` then `vp run build:desktop:bundle`. Fetch Electron using `node node_modules/electron/install.js` from apps/desktop if its install hook was skipped.

The flow captures two identical desktop screenshots 500 ms apart before saving a still. Videos are real Xvfb screen recordings at 10 fps, including Electron's native browser view. No page or state is mocked. Settings and panel actions are UI clicks; DOM float counts supplement the visual evidence. SIGTERM to the retained driver PID closes its Electron process, server, recorder and synthetic HTTP server.

Device panels were not exercised: no mobile device was leased for this browser reproduction.
