Repository navigation
Conversation
A phone's owner socket restarted its idle timer only on frames, and the relay pinged desktop sockets alone, so a page left open on a phone for one idle period (60 s in the self-host profile) closed without a close frame. The phone then showed Read-only with "dohc could not reach the server." on its next edit. The relay now runs its keepalive ping loop for phone owner sockets too. Each answered ping restarts the idle timer, and a phone that stops answering still closes after one idle period. Desktop session checks stay behind trackedDesktop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A phone's open page drops to Read-only after it sits idle for one idle period. The relay now pings phone owner sockets, as it already pings desktops, so an idle phone page stays live.
Cause
Every live connection has an idle timer (
namedLiveRoutes.ts,setTimeout(stop, limits.idleTimeoutMs)). When the timer fires,stop()terminates the socket. On a phone owner socket, only frames restart that timer:if (desktop);A phone that sits on a page without editing for the idle period (60 s on the self-host profile) has its socket terminated. Its next keystroke then finds the connection closed, and the page shows Read-only with "dohc could not reach the server." A Gemini 4 Neon test on Drive hit this on the first Return after about 1–2 minutes without edits. With the idle limit set to 1 s, a relay test reproduced it: the socket closed after 1 s, even when the phone pinged every 200 ms.
Change
ownerPhone, replacing a localphoneused byticketedand the Show on phone guard.There's no config, protocol or client change. Phones answer pings automatically: SocketRocket on iOS, OkHttp on Android. Each open phone page costs one 8-byte ping every half idle period.
Verification
namedLiveRoutes.test.tsgains one test. An idle phone owner socket stays open through 5 pings past the idle limit, and a phone that answers with wrong pongs closes within 2× the limit. It fails on main and passes with the fix.namedLiveRoutesandownerLiveTransport: 158 pass.liveAuthorityWrites,personalLiveRoutes,selfHostLiveProfile: 33 pass.pnpm verify:prresults go in a comment.Review
GPT Sol: ACCEPT 9/10.
Deploying this to Drive needs Ice's OK.
🤖 Generated with Claude Code