Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): increase backend readiness timeout to 3 minutes #4825

Closedcarlospedreira(GitHub profile, opens in a new tab)wants to merge 10 commits intomain fromrefs/pull/4825/headopened View on GitHub

Summary

Increases DEFAULT_BACKEND_READINESS_TIMEOUT in apps/desktop/src/backend/DesktopBackendManager.ts from 1 minute to 3 minutes.

Fixes #4535

Why

When the packaged server bundle is loaded through /mnt/c, WSL backend startup can take well over the current 60-second readiness window (~117 seconds measured on my system — see this comment). The backend eventually becomes healthy, but the desktop app has already stopped probing and stays stuck on "Connecting to WSL…" forever.

This only raises the maximum wait: readiness polling still resolves as soon as the endpoint responds, so fast backends connect immediately as before. Precedent: #1979 previously raised this timeout from 10s to 30s, and other remote backend paths already use three-minute startup/readiness windows.

Note this is a pragmatic mitigation — it does not address the underlying /mnt/c filesystem performance problem for the WSL bundle.

Verification

  • Reproduced the timeout locally on WSL and confirmed T3 Code connects successfully to the WSL backend with this change (backend became ready at ~117s).
  • pnpm typecheck (apps/desktop) passes.
  • pnpm test src/backend/DesktopBackendManager.test.ts — 12 tests pass.
  • Lint and format checks pass on the changed file.

🤖 Generated with Claude Code


Note

Low Risk Single constant change to startup polling duration with no auth, data, or behavioral changes beyond tolerating slower backend boot.

Overview Raises DEFAULT_BACKEND_READINESS_TIMEOUT in DesktopBackendManager from 1 minute to 3 minutes so the desktop app keeps polling /.well-known/t3/environment long enough for slow WSL backends (e.g. server bundle on /mnt/c) that can take well over 60s to become ready.

Polling still ends as soon as the endpoint responds, so fast local backends connect immediately; only the maximum wait is longer.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ae3d2f1fc70435abab48494ad3077cf17ebcf3fa. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Increase backend readiness timeout to 3 minutes in DesktopBackendManager

Raises DEFAULT_BACKEND_READINESS_TIMEOUT from 1 minute to 3 minutes in DesktopBackendManager.ts to reduce premature timeout failures during backend startup.

Macroscope summarized ae3d2f1.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 377b0af9-dcf6-42d1-9017-15fde2ecfc29

      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

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved ae3d2f1

      This PR increases a backend readiness timeout constant from 1 to 3 minutes. This is a low-risk configuration tweak with no logic changes - timeout increases simply allow more time before failing.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).

Sign in to join this conversation.