Commit Graph
19 Commits
Author SHA1 Message Date
Theo BrowneandClaude Opus 5 7aecc5d47a fix: address review findings on the reconnect flow
Three defects found by Macroscope and Cursor Bugbot:

- The restart window was armed only at click time, but an npm install can
  consume most of the 10-minute request window, so a slow-but-successful
  update restarted after the window had lapsed and was presented as an
  outage. Re-arm from the acknowledgement and from the interrupt path,
  matching what keepPendingForRestart already does for the button expiry.

- Effect.catch on the detached restart fiber only sees typed failures, so
  an unexpected defect skipped the inFlight reset and left a live process
  refusing every further update until restarted by other means. Release
  the guard from Effect.onExit, outside the typed handler. Success still
  deliberately keeps it set: systemd is about to stop the process and a
  second update would race the handoff.

- "A server update is already in progress" is a typed failure, so it
  cleared a restart overlay that the earlier still-pending update needed,
  restoring the harsh reconnect UI mid-restart. That reason now lives in
  contracts as SERVER_SELF_UPDATE_ALREADY_RUNNING_REASON with an
  isAlreadyRunning helper, so the client can distinguish it structurally
  instead of matching prose.

Each fix has a regression test; the defect-path test was confirmed to
fail without the onExit change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-07-24 16:47:51 -07:00
Theo BrowneandClaude Opus 5 b462ae5f2f fix: clean up the remote server update reconnect flow
Clicking "Update server" on a relay-connected server showed a spinner,
then a disconnected banner with a raw transport error, then hung until
the page was refreshed. Three separate causes:

1. The boot-service (systemd) update path ran `systemctl --user restart`
   synchronously inside the RPC handler, so the process died before the
   acknowledgement flushed. Every successful update reached the client as
   an interrupt, which ServerUpdateAction released quietly — no success
   toast, and nothing told the connection layer a restart was coming.
   The restart is now deferred like the respawn path. Rollback and the
   in-flight reset move onto the detached fiber and log instead of
   failing the (already-acknowledged) RPC.

2. Reconnect backoff escalates to 16s, so the client was frequently
   asleep exactly when the server came back; refreshing reset the
   failure count, which is why refreshing "fixed" it. A restart-expected
   overlay is now armed before dispatch and retries on a flat 2s cadence
   while it is active, and only while the supervisor is sleeping in
   backoff so a live attempt is never interrupted. It expires on its own
   after 90s and is withdrawn on an explicit RPC failure, which proves
   the server stayed up.

3. Two consecutive websocket-ticket failures evicted the cached DPoP
   token, forcing a full relay bootstrap and token exchange during
   reconnect. Eviction is now limited to failures suggesting a stale
   endpoint; plain unreachability (network/timeout) — the shape of a
   restart — keeps the token.

Also stops piping raw transport messages (which embed internal endpoint
URLs) into the composer banner: presentation maps each failure reason to
a stable summary and carries the reason for callers, while the raw
message remains on the supervisor state for diagnostics.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-07-24 16:35:49 -07:00
Theo Browne 88c69ffff6 fix(server): parse CLI version in update preflight (#4389) 2026-07-23 12:58:33 -07:00
Julius Marmingeandcodex ab4a88386d Add remote server updates and standalone service management (#4286)
Co-authored-by: codex <[email protected]>
2026-07-22 23:49:21 +02:00
Julius Marmingeandcodex 2b180a2b2d Refine T3 Connect authorization surfaces (#4159)
Co-authored-by: codex <[email protected]>
2026-07-19 19:23:53 +02:00
7a820abfdd feat: add headless t3 connect setup for SSH hosts (#3749)
Co-authored-by: Claude Fable 5 <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: codex <[email protected]>
2026-07-19 18:59:23 +02:00
Julius MarmingeandClaude Opus 4.8 d8e0ba3ea0 Improve live activity routing and diagnostics (#3685)
Co-authored-by: Claude Opus 4.8 <[email protected]>
2026-07-07 00:56:20 -07:00
Julius Marmingeandcodex 4d3fcacd84 [codex] Type malformed Clerk public config failures (#3422)
Co-authored-by: codex <[email protected]>
2026-06-20 11:18:38 -07:00
Julius Marmingeandcodex 97e5cd3bf7 [codex] align server auth Effect services (#3180)
Co-authored-by: codex <[email protected]>
2026-06-20 01:34:52 -07:00
Julius Marmingeandcodex 2fa37ec183 [codex] Enforce canonical Node namespace imports (#3238)
Co-authored-by: codex <[email protected]>
2026-06-20 01:06:37 -07:00
Julius Marmingeandcodex b0a3a50448 [codex] Refactor project and workspace Effect services (#3190)
Co-authored-by: codex <[email protected]>
2026-06-20 00:12:46 -07:00
Julius Marmingeandcodex 4ee719a094 [codex] refactor server cloud Effect services (#3183)
Co-authored-by: codex <[email protected]>
2026-06-19 21:21:15 -07:00
13917df1fe Use idiomatic Effect options for server secret reads (#3110)
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: codex <[email protected]>
2026-06-19 11:15:35 -07:00
Julius Marmingeandcodex e95b57dc26 [codex] Rewrite client connection architecture (#2978)
Co-authored-by: codex <[email protected]>
2026-06-18 13:10:32 -07:00
Julius Marmingeandcodex 708d5383a9 [codex] Trace first-party relay clients (#2995)
Co-authored-by: codex <[email protected]>
2026-06-16 00:11:29 -07:00
Julius Marmingeandcodex 22f9f3058b [codex] Rebrand T3 Cloud as T3 Connect (#3011)
Co-authored-by: codex <[email protected]>
2026-06-09 12:25:02 -07:00
Julius Marminge 9da430c828 Refactor recoverable Effect fallbacks to orElseSucceed (#2968) 2026-06-05 05:47:56 +00:00
Julius Marminge f60def2054 Migrate tests to vite-plus test APIs (#2964) 2026-06-05 04:39:19 +00:00
Julius Marmingeandcodex 5ae77c0d63 feat(relay): Add managed relay tunnels and APN service (#2837)
Co-authored-by: codex <[email protected]>
2026-06-04 19:53:56 -07:00