Skip to content

Recover stale relay connections and explain outage layers - #1638

Merged
luokerenx4 merged 1 commit into
devfrom
codex/connection-lifecycle
Sep 24, 2026
Merged

luokerenx4 merged 1 commit into
devfrom
codex/connection-lifecycle

Conversation

@luokerenx4

Copy link
Copy Markdown
Contributor

A selected remote target can remain recorded while its SSH forward resets every backend request. The browser then shows the same generic offline page used for a stopped local relay, and refreshing cannot repair the forward.

The relay now rebuilds a failed or exited SSH forward once for all tabs, verifies the replacement, and retries failed recovery with backoff. Its status reports whether the selected target is healthy, reconnecting, or unavailable; a same-origin reconnect action supports a manual retry. A connection lifecycle hook combines that status with the backend heartbeat so the recovery screen distinguishes local relay loss, a remote target outage, and a local backend outage. Fleet discovery remains outside the heartbeat. The screen shows the selected Machine and AliceProject, offers location switching only while the relay is reachable, and preserves the current page during recovery.

The interaction uses the existing full-screen recovery surface and location chooser. It keeps focus on the alert dialog, announces changing status, stacks controls on narrow screens, and respects the existing reduced-motion spinner behavior. Copy is updated in all four UI locales.

Validation: root and UI typechecks; complete pnpm test (7334 passed, 5 skipped); targeted relay, auth, lifecycle-hook, and chooser specs (25 passed); real browser at port 5177 with independent backend and relay failure injection, followed by recovery to Settings. The reported port-5175 incident was reproduced as relay status 200, backend proxy 502 ECONNRESET, remote Runtime 200 over SSH; rebuilding its selected forward restored backend HTTP 200 without restarting the remote Runtime.

@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openalice-demo Building Building Preview Sep 24, 2026 3:48pm UTC

Request Review

@luokerenx4
luokerenx4 merged commit b3d2c36 into dev Sep 24, 2026
2 of 3 checks passed
@luokerenx4
luokerenx4 deleted the codex/connection-lifecycle branch September 24, 2026 15:49

This branch was successfully deployed

1 active deployment
Preview — f5f70d47 Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant