# F21 error presentation trace

PR [#33554](https://git.cafe/pingdotgg/t3code/pull/33554): before [ee59ab22a8](https://git.cafe/pingdotgg/t3code/commit/ee59ab22a819acb0544d85cd6cca0e4aa8c7c444), after [e4868beb9d](https://git.cafe/pingdotgg/t3code/commit/e4868beb9d922edc2dd0ebaf6db16c996b044d5b).

`git diff --stat ee59ab22a8 e4868beb9d -- apps/web packages/ui packages/client-runtime` produces no output. The renderer is byte-identical.

1. The before [SSH readiness timeout](https://github.com/pingdotgg/t3code/blob/ee59ab22a819acb0544d85cd6cca0e4aa8c7c444/packages/ssh/src/tunnel.ts#L1052) and after [SSH connection timeout](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/packages/ssh/src/tunnel.ts#L1120) produce `SshReadinessError`. The two raw messages supplied by the lead's real F06 runs are used without changing their wording or port.
2. [DesktopSshEnvironment](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/apps/desktop/src/ssh/DesktopSshEnvironment.ts) passes the manager's failure through; the [SSH IPC method](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/apps/desktop/src/ipc/methods/sshEnvironment.ts) only special-cases password-prompt cancellation. [DesktopIpc](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/apps/desktop/src/ipc/DesktopIpc.ts#L97) runs it with `Effect.runPromiseWith`. [Preload](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/apps/desktop/src/preload.ts#L168) awaits `ipcRenderer.invoke`.
3. The synthetic `ipc-probe.cjs` reproduces the same Effect tagged-error definition and runPromise boundary in real Electron IPC. Electron 44.10.1 returns `Error invoking remote method 'desktop:ensure-ssh-environment': SshReadinessError: <raw message>`. This probe checks serialization; it does not rerun SSH.
4. [sshPreparationError](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/apps/web/src/connection/platform.ts#L167) wraps the rejection as `ConnectionTransientError`, adding `Could not prepare the SSH environment: `. Its `.message` returns `.detail` in the [connection model](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/packages/client-runtime/src/connection/model.ts#L105).
5. [Onboarding](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/packages/client-runtime/src/connection/onboarding.ts#L261) awaits `gateway.provision` without removing that prefix. The [web atom command](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/apps/web/src/connection/onboarding.ts#L26) delivers the failure to the [dialog handler](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/apps/web/src/components/settings/AddEnvironmentDialog.tsx#L173).
6. [formatDesktopSshConnectionError](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/apps/web/src/components/settings/ConnectionsSettings.logic.ts#L285) strips IPC/tag prefixes only at the beginning of the string. The connection-layer prefix now comes first, so both inner prefixes survive. [AlertDescription](https://github.com/pingdotgg/t3code/blob/e4868beb9d922edc2dd0ebaf6db16c996b044d5b/apps/web/src/components/settings/AddEnvironmentDialog.tsx#L592) renders that resulting string.

Exact before alert:

```text
Could not prepare the SSH environment: Error invoking remote method 'desktop:ensure-ssh-environment': SshReadinessError: Timed out waiting 20000ms for backend readiness at http://127.0.0.1:33863/.
```

Exact after alert:

```text
Could not prepare the SSH environment: Error invoking remote method 'desktop:ensure-ssh-environment': SshReadinessError: SSH connection to fixture-never did not come up within 90000ms.
```

HARNESS: Real app Settings → Connections/Environments → Add environment → SSH. `window.desktopBridge.discoverSshHosts` returns an empty synthetic list; `ensureSshEnvironment` rejects the real measured raw error plus the verified Electron IPC prefix. Only minimal desktop presence/theme/zoom methods are stubbed in addition. Production connection provisioning, onboarding, atom failure handling, formatter, dialog, CSS, and fonts run unchanged. No SSH operation is claimed in this capture. Native Electron reduced-motion is enabled; transitions/animations/caret are additionally suppressed by the labelled harness. No database is copied or seeded from live state.

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