You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): a server updated with the app reconnects as soon as it is ready - #35327
"Update everything" in the desktop app updates the app and its remote servers together. The app relaunches while a remote server is still restarting. After the relaunch, the server's row stays on "Restarting…" for minutes after the server is ready, and the server cannot be used from the app in that time.
On a real update, the server was reachable again at 13:19:48. The relaunched app reconnected at 13:23:06, which is 3 min 18 s later. Several users reported that remote server updates feel very slow; this wait is the largest single part of it.
The cause: the update command retries the connection about once a second while a server restarts (nudgeReconnectDuringUpdateRestart). That command does not survive the app relaunch. The relaunch path, followHandedOffServers, restored the "Restarting…" state but started no retry. The connection then waited on its normal backoff, which doubles up to 5 minutes, and both the composer banner and the settings row hide "Retry now" while an update runs.
Change
followHandedOffServers now runs the same reconnect nudge for each handed-off server and stops it when that server settles (updated, or the 32 minute timeout). No new retry logic: it reuses the existing helper with the app's connection state and retryNow command.
Scope
A bug fix in one function, with no behavior change outside the relaunch-after-update path. No issue is linked: the cause and the fix are both small and are shown above. It does not overlap #33002, which reports rollbacks in the same function.
Not in this PR: the server-side update time (database backup and migrations).
Verification
New case in updateEverythingRun.test.ts, "retries the connection to a restarting server instead of waiting out its backoff". Without the source change it fails with expected "run" to be called ... Number of calls: 0. With the change, all 4 tests in the file pass.
vp run check:changed passes: format, lint, knip, typecheck, the test file, and the React compiler check.
The 3 min 18 s wait was measured from the server's own logs and traces for one real update: first WebSocket upgrade after the restart compared with the time the tunnel was reachable.
Not checked: a full "Update everything" run in a built desktop app with the fix. That needs a published app update and a remote server update at the same time. There is no after-capture for the same reason.
Reviewed with sol-loop: 1 rounds with gpt-6.1-sol on medium. Sol verdict: approved
Created with Claude Fable 5.2 in T3 Code (Claude Code harness).
…eady
"Update everything" relaunches the desktop app while a remote server is
still restarting. The relaunched app restored the "Restarting…" state but
nothing retried the connection, so it waited out a backoff that doubles up
to five minutes. On a real update the app reconnected 3 min 18 s after the
server was reachable again.
The relaunch path now runs the same reconnect nudge as the update command
and stops it when the server settles.
Macroscope's review found this PR approvable — After an app-update relaunch, restarting servers now reuse the existing paced reconnect mechanism instead of waiting through normal backoff. Retries are limited to handed-off updates and stop when recovery completes or times out.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between 196dd06 and 2fd1a9d.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
When following a handed-off server update, the code starts a reconnect nudge using the environment’s connection state and retries through environmentCatalog.retryNow. The nudge stops when the update settles. A test verifies retry behavior for a backoff connection.
The handed-off server watcher starts a reconnect nudge using the environment’s connection state and an immediate-retry callback. The update settle path stops the nudge. The test checks that a backoff connection triggers environmentCatalog.retryNow with the atom registry and environment ID.
sequenceDiagram
participant UpdateEverythingRun
participant ReconnectNudge
participant EnvironmentCatalog
UpdateEverythingRun->>EnvironmentCatalog: Read environment connection state
UpdateEverythingRun->>ReconnectNudge: Start nudge with state and retry callback
ReconnectNudge->>EnvironmentCatalog: Retry environment connection
UpdateEverythingRun->>ReconnectNudge: Stop nudge when update settles
Loading
Possibly related issues
pingdotgg/t3code#24661: This issue reports clients waiting through connection backoff after a server restart. This change adds immediate retry behavior to the handed-off server update flow.
Possibly related PRs
pingdotgg/t3code#32924: Both changes define when a handed-off server update settles in updateEverythingRun.tsx.
pingdotgg/t3code#26109: Both changes update the handed-off server lifecycle in followHandedOffServers and add related tests.
Suggested labels:bugfix
Suggested reviewers:juliusmarminge, tris203
Merge Risk: Minimal · previous review 196dd
After a remote server update, the relaunched app now retries the connection immediately instead of waiting out a backoff that can last up to five minutes. No actionable merge-blocking risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a server updated with the app now reconnects as soon as it is ready. It matches the fix in followHandedOffServers, which runs the reconnect nudge after an app relaunch…
Description check
The description follows the repository template. It has Problem, Change, Scope, and Verification sections, and each section has specific content. The Problem section gives the expected behavior, the c…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a server updated with the app now reconnects as soon as it is ready. It matches the fix in followHandedOffServers, which runs the reconnect nudge after an app relaunch. It follows conventional commit form with a clear scope.
Full details: Description check
Explanation
The description follows the repository template. It has Problem, Change, Scope, and Verification sections, and each section has specific content. The Problem section gives the expected behavior, the cause, and measured timing. The Change section explains the reuse of the existing reconnect helper. The Scope section explains why no issue is linked and what is excluded. The Verification section names the new test, the failing result without the change, the check command, and what was not checked. The author also included the agent/model line that the template requests. The template asks for before/after screenshots for UI changes, but this fix changes timing logic and has no visible UI change, so the omission is acceptable.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
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
size:S10-29 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
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.
Problem
"Update everything" in the desktop app updates the app and its remote servers together. The app relaunches while a remote server is still restarting. After the relaunch, the server's row stays on "Restarting…" for minutes after the server is ready, and the server cannot be used from the app in that time.
On a real update, the server was reachable again at 13:19:48. The relaunched app reconnected at 13:23:06, which is 3 min 18 s later. Several users reported that remote server updates feel very slow; this wait is the largest single part of it.
The cause: the update command retries the connection about once a second while a server restarts (
nudgeReconnectDuringUpdateRestart). That command does not survive the app relaunch. The relaunch path,followHandedOffServers, restored the "Restarting…" state but started no retry. The connection then waited on its normal backoff, which doubles up to 5 minutes, and both the composer banner and the settings row hide "Retry now" while an update runs.Change
followHandedOffServersnow runs the same reconnect nudge for each handed-off server and stops it when that server settles (updated, or the 32 minute timeout). No new retry logic: it reuses the existing helper with the app's connection state andretryNowcommand.Scope
A bug fix in one function, with no behavior change outside the relaunch-after-update path. No issue is linked: the cause and the fix are both small and are shown above. It does not overlap #33002, which reports rollbacks in the same function.
Not in this PR: the server-side update time (database backup and migrations).
Verification
updateEverythingRun.test.ts, "retries the connection to a restarting server instead of waiting out its backoff". Without the source change it fails withexpected "run" to be called ... Number of calls: 0. With the change, all 4 tests in the file pass.vp run check:changedpasses: format, lint, knip, typecheck, the test file, and the React compiler check.Reviewed with sol-loop: 1 rounds with gpt-6.1-sol on medium. Sol verdict: approved
Created with Claude Fable 5.2 in T3 Code (Claude Code harness).