# PR-panel link routing evidence

Run each revision separately in its own worktree. Install dependencies with `vp i` and Electron with `node node_modules/electron/install.js` from apps/desktop. Start `T3CODE_DEV_SEED=0 T3CODE_DESKTOP_REMOTE_DEBUGGING_PORT=<port> headless-desktop vp run dev:desktop`, with a stand-in xdg-open first on PATH that appends its argument to a log. Keep the same light theme and a 1600x1000 Electron window at display origin. Resize the right-panel divider to x=620.

Create a project using `node apps/server/src/bin.ts project add <checkout> --title "Link routing proof" --base-dir .t3`. From apps/server, run seed.mjs on stdin with `node --input-type=module`, setting PROOF_HOME to the isolated .t3 directory and PROOF_PROJECT to the returned project id. This creates an idle synthetic thread through authenticated server RPC; no provider turn runs.

In the real Electron UI:
1. Settings > Browser > Open links in: choose T3 Code.
2. Pull requests: open https://github.com/pingdotgg/t3code/pull/39849 (the selectedUrl route also needs repository=pingdotgg/t3code, number=39849 and projectId).
3. More pull request actions > Link to thread > PR link routing.
4. Open that thread at /<environmentId>/<threadId>, open the right panel, and select Pull request.
5. Run record-x11.cjs with ACTION=menu. It clicks More pull request actions > Open on GitHub and records the actual X display.
6. If a Browser tab opened, close that tab. Run the same script with ACTION=number to click the visible PR-number header button.

Driver environment: PW_PATH points to apps/desktop/node_modules/playwright-core; CDP_PORT selects the running Electron app; SIDE is before or after; EVIDENCE_DIR is a new output directory; DISPLAY and XAUTHORITY select the Xvfb session. Each recording uses ffmpeg x11grab at 15fps; stills wait for two identical screenshots 500ms apart. The original base stills used Playwright screenshots; the final head stills use the X display to include the embedded Browser correctly.

Observed: base handed the URL to xdg-open once for each action and opened no Browser tab. Head opened a Browser tab in the same thread for each action, with the GitHub PR URL, and added no xdg-open calls.
