1# Desktop Helper Pairing — draft set23> **DRAFT ARTIFACTS.** This folder is design-time scaffolding for pairing the4> Peach browser extension (Solid.js + TypeScript) with the `peach-sync` desktop5> helper, then syncing the vault to it over the LAN. Nothing here is wired into6> the build. On apply, follow `INTEGRATION-CONTRACT.md` and then the whole folder7> can be removed (use `trash`, never `rm`).89## What this is1011A six-change plan, each pinned to verified source in both repos12(`peach-browser` and `peach-sync`):13141. **Change 1** — send `vault_id` in the `PAIR_IDENTITY` frame so the helper15 records which vault it paired to.162. **Change 2** — `"desktop"` DeviceType (**already present** — no-op).173. **Change 3** — background code-pairing client (`desktop-pairing.ts`).184. **Change 4** — popup pairing UI (`DesktopPairingFlow.tsx`).195. **Change 5** — handshake-free subnet port probe for the pairing port.206. **Change 6** — include `"desktop"` peers in sync sessions (**one-line filter21 widening** — not a no-op as first assumed; see below).2223## Corrected premises vs the original brief2425The brief was written before reading the source. These premises were wrong and26are corrected throughout the draft set (binding pin: `_GROUND-TRUTH.md`):2728| Brief said | Reality (verified) |29| --- | --- |30| Add `"desktop"` to `DeviceType` in `src/shared/types.ts` | `"desktop"` already in `src/shared/sync-types.ts:11`; `types.ts` has no `DeviceType`. **Change 2 is a no-op.** |31| Helper acks with `PEACH_HELLO_OK` | It's **`PEACH_HELLO_ACK`** (`pairing.zig:40`). No `_OK` frame exists. |32| Helper sends `PEACH_HELLO_ERROR` on wrong code | **No error frame.** Wrong/expired code → silent socket close + code rotation (`pairing.zig:117,119-125`). |33| (implied) browser is NK responder | For desktop pairing the **browser is the NK initiator** (`pairing.zig:153-154`) — opposite of the audio-chirp flow. |34| React, hooks, `PeachField`, `OutlinedTextField` | Repo is **Solid.js**. No `PeachField` component — it's a `<input class="peach-underline-input">`. Tests use `renderView`, not `@solidjs/testing-library`. |35| Bump 4.0.1 → 4.0.2 | Dev is **already 4.0.2**. Integration bumps **4.0.2 → 4.0.3**. |36| Sync port assumption | Sync server is **8765** (Noise XX); pairing server is **49142** (Noise NK). Both verified. |37| Change 6 just works | Runner/coordinator are generic, **but** `sync-trigger.ts:104` filters to `android|ios` only — desktop must be **added** to that one filter. |38| `derivePairingSas` (lowercase) | Existing export is `derivePairingSAS` (capital). Reuse it. |39| SAS KAT `0fbab8cd… → 895245` | **Correct** — confirmed against `pairing.zig:275-279`. |40| `{ accept: true }` on confirm | Canonical payload is `{ confirmed: boolean }` (03 + 04). |4142## Reading order43441. `_GROUND-TRUTH.md` — the binding wire contract. Read first.452. `01-vault-id-in-pair-identity.md`463. `02-desktop-device-type.md` (no-op verification)474. `05-subnet-probe.md` (Change 3 depends on it)485. `03-desktop-pairing-handler.md`496. `04-desktop-pairing-ui.md`507. `06-sync-coordinator-desktop.md`518. `tests/` — the four companion spec files (26 specs total).529. `INTEGRATION-CONTRACT.md` — the authoritative apply plan (file map, order,53 message contract, TODOs, version, quality bar). Read last, follow on apply.