# Connection recovery proof

Target: [#19251](https://github.com/pingdotgg/t3code/pull/19251). Final head: `200847c319a451da171554be3373aabc8ff28568`. Actual main baseline: `1451e7cb23034d29774338608368a15d8845df36`.

The primary drove the real web client through T3 Code's collaborative browser at 1280×800, using isolated worktree state and a second actual local server. A disposable loopback proxy forwarded real HTTP/auth/WebSocket traffic. Its only descriptor changes were the fixture label and switching between protocol 1/version 0.0.45 and the actual compatible protocol 2/version 0.1.0; mode changes closed fixture sockets. Saved bearer registrations were seeded into this browser's disposable IndexedDB. No real relay account or provider turn was used.

## Before and after

For the baseline, all production paths changed by this PR were temporarily replaced with their exact origin/main bytes, then restored and hash-checked. The real browser first connected to the remote server. Incompatible discovery changed the switch to Off and persisted that environment in disabledEnvironmentIds. Restoring compatibility did not remove that saved Off choice. After restoring the final head, a reload still displayed that persisted Off state until explicit On.

On the final head, explicit On connected to the actual remote server. Incompatible discovery displayed Client not supported, retained the blue On switch and exposed Check again. Retrying while incompatible stayed paused. Returning the proxy to compatible mode and dispatching a visible-document visibilitychange reconnected without a page reload. The final recording captures that interaction; matching baseline/final screenshots show the incompatible row with Off versus On. Both captures have the same fixture, viewport and surrounding Settings data.

Earlier integrated runs on 5c671d6 (the same recovery/notice production code, before the later isolated Cloud list presentation fix) also verified compatible manual retry, synthetic offline/online recovery, explicit Off through retry/wake/network/reload, and explicit On recovery. These are synthetic browser events, not actual operating-system network/background transitions.

## One-time notice

The final-head capture shows five saved Off fixtures, with three names plus “2 more”; no switch was enabled and the reviewed marker was absent before answering. Keep off left all five disabled, marked the review complete and suppressed the question after reload.

Earlier integrated runs on the unchanged notice code also verified Turn on saves all five enabled choices and the marker. Only Recovery demo had a real live endpoint and connected; the other four deliberately unavailable fixtures prove saved choice, not connection success. A controlled IndexedDB catalog-write QuotaExceededError produced an error notification, left the review unanswered, and showed the question after reload. First-ready state with no Off entries was marked reviewed so a later intentional Off did not prompt on relaunch. UI interruption was checked only through the shared coordinator harness.

## Automated and review evidence

- Focused tests: 83 incoming cases across six files reduced to 77 across five; 72 main cases preserved, PR-added cases 11 → 5. Five assertions fail with the main production behavior.
- Extended one existing Cloud list component case, keeping its suite at ten cases. Before the fix, stale health caused four direct visible-state/selection assertion failures; after the fix, ten cases pass using the actual component in jsdom. The five focused suites also pass: 87 cases total.
- Scoped client-runtime, web and mobile typechecks, lint and formatting passed. Final isolated Cloud presentation fix reran web typecheck and targeted lint/formatting.
- Whole-diff adversarial reviews run independently by Opus and Sol. Round-one saved Cloud row inconsistency was fixed. Post-push Macroscope then found a same-endpoint platform refresh losing explicit Off while paused. An existing registry case was extended (six direct red assertions, unchanged case count), followed by a one-line fix carrying previous.enabled with the paused state. All 77 focused cases pass after the fix; the ten Cloud component cases passed real Chromium CI on a166a79 and are unchanged. Native platform reconciliation remains unit-level proof only. Fresh round-three reviews follow the fix.

## Limits

The Chromium Vitest project could not start because its Playwright headless-shell executable is missing; actual-component jsdom and the separate real T3 browser provided the available proof. Welcome/Connect onboarding stale-health rendering was proved by component interaction, not an authenticated integrated relay run. Saved sidebar project-filter preservation has focused state-test proof, not a completed integrated UI pass.

Android dialog FIFO/input/dismiss lifecycle, iOS, Windows, macOS, Electron desktop and authenticated T3 Connect relay behavior were not run. A genuinely old relay endpoint is still correctly rejected; the specific coreldh installation is not proven fixed. Human approval and those native/account-specific checks remain outstanding. No merge performed.

Models/harnesses: tests GPT-6 Astra; implementation GPT-6.1 Sol; adversarial reviews Claude Opus 5.5 and GPT-6 Sol, delegated through T3 Code; primary Codex harness.

The final-head pause/Check again/foreground recovery recording and consent/Keep off/reload captures were refreshed on 200847c. The previously observed failed-write summary is one user-visible toast; default command reporting writes console diagnostics, not duplicate toasts. The untouched WorkflowOpeningBlock syntax-highlighting test failed on the previous CI run and needs a new-head result. Healthy platform-owned registrations still follow main's default-enabled refresh semantics; this change preserves explicit choice specifically while paused.
