# Linux desktop connection-catalog proof

AI-assisted; verified with the tests and tools listed above.

Build each checkout with `vp i`, `vp run build:desktop:bundle`, and (from apps/desktop) `node node_modules/electron/install.js` and `node scripts/build-browser-secret.mjs`. The helper requires libsecret-1-dev and pkg-config. Runs use headless-desktop (Xvfb, D-Bus, unlocked GNOME keyring), xterm, xdotool, ffmpeg, ImageMagick, secret-tool, and Node with WebSocket support.

Place capture.sh and drive.mjs in a scratch directory. Set SCRATCH to that directory, CHECKOUT to the checkout being tested, SIDE to base or head, COMMIT to its full SHA, RUN_DIR to a fresh directory, and XDG_DATA_HOME to "$RUN_DIR/data" **before** starting headless-desktop. Create "$SCRATCH/staged-$SIDE/package.json" containing {"name":"t3code","main":"apps/desktop/dist-electron/boot.cjs"} and symlink its apps directory to "$CHECKOUT/apps". Run `headless-desktop bash "$SCRATCH/capture.sh"`. Run sides sequentially (CDP uses port 9433).

The driver seeds only synthetic settings and a disabled synthetic remote environment. The local environment is disabled to keep machine identity and provider history out of captures. It saves through window.desktopBridge.setConnectionCatalog under the source productName, then switches to AppImage-style package metadata using the same T3 home and keyring. It reads through the real IPC bridge, opens Settings > Environments in the renderer, and restarts the packaged identity. The disabled row intentionally avoids contacting a remote server.

Before: source read succeeds, packaged read and restart reject with decrypt-catalog; UI says No saved remote environments. Catalog SHA-256 unchanged across switch.
After: source read succeeds, packaged read and restart return the saved target and profile; UI retains Saved demo environment. Catalog SHA-256 changes during recovery, as expected for re-encryption.

Screenshots are saved only after two identical renderer captures 500ms apart. Desktop stills were also identical 500ms apart. Recordings include app startup, switching identity, the actual IPC results, Settings > Environments, and the packaged restart. No production data or credentials are included.

Scope: staged AppImage identity in real Electron, as in triage; not a downloaded AppImage artifact. No authenticated remote connection or credential was seeded. A preliminary rollback check found that source identity cannot decrypt the catalog after head migrates it to the packaged key.
