# Desktop reproduction environment

Run each revision in its own checkout with dependencies installed (`vp i`). Use fresh T3 homes and `T3CODE_DEV_SEED=0`. Do not seed from a live database.

This proof used Linux, Electron on `headless-desktop` (Xvfb), and the installed Chromium as the system browser. Desktop captures are 1920×900, light theme; the T3 window occupies the left 1100 pixels and the launched browser the right 820 pixels. The same capture driver ran on both revisions. The sidebar and terminal drawer were hidden during captures so generated titles and terminal prompts could not expose private details or animate in the stills.

The remote server ran inside a Linux network namespace, connected to the host by a veth pair: host 10.240.90.1/30, remote 10.240.90.2/30. The namespace's loopback was up and separate from the desktop's loopback. No forwarding or browser APIs were mocked. T3's real loopback-locality probe classified the remote connection as forwardable. No second physical machine was used.

Start the revision's server inside that namespace as the normal user:

```
T3CODE_ENVIRONMENT_LABEL='Remote demo' T3CODE_DEV_SEED=0 node apps/server/src/bin.ts serve --host 0.0.0.0 --port 3773 --base-dir "$REMOTE_HOME" --no-browser
```

Start its desktop with `T3CODE_DESKTOP_REMOTE_DEBUGGING_PORT=19290`, `T3CODE_ENVIRONMENT_LABEL='Local demo'`, and `T3CODE_DEV_SEED=0` under `headless-desktop vp run dev:desktop`. Retain DISPLAY and XAUTHORITY in files named `display-<side>` and `xauthority-<side>` under the scratch root. Use an isolated XDG_CONFIG_HOME and an XDG_DATA_DIRS entry containing a browser desktop file; the default HTTP/HTTPS handler launches real Chromium with a fresh user-data-dir, `--remote-debugging-port=19291 --window-position=1100,0 --window-size=820,900 --no-sandbox --test-type --no-first-run --no-default-browser-check`. This only configures the system browser; Electron's openExternal and the actual browser launch run normally.

Mint a pairing token using `node apps/server/src/bin.ts pair --base-dir "$REMOTE_HOME"` and save its output locally as `pair-<side>.log`. Do not upload that output. Set PROOF_ROOT, PROOF_WORKTREE, and PROOF_SIDE (`base` or `head`) for the uploaded scripts. `setup.mjs` pairs through the UI, creates a synthetic project and stopped thread, then starts Python in the thread terminal. Terminal input must wait until Ghostty has initialized; early input in the first setup attempt was re-entered after the shell prompt was visible. Head's failed provider turn was stopped after its automatic retries; base's turn was stopped immediately. No provider result is needed by the reproduction.

Run `capture.mjs` on that thread. It stops any existing forward and closes any previous browser before each Ctrl-click and middle-click, records the X display, and captures each result. Its still-image check requires two app screenshots 500 ms apart to match. All four final captures met that check. Inspect the resulting screenshots and recordings before uploading them.

Observed on base: both clicks created the forward and produced the 'Unable to open in browser' toast; no system browser launched. A request through the base's forward returned HTTP 200 and the directory listing. Observed on head: both clicks created the forward and launched Chromium at http://localhost:3000/, rendering that same remote directory listing, without the toast.
