Skip to content

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

Open
carlospedreira wants to merge 3 commits into
pingdotgg:mainfrom
carlospedreira:fix/backend-readiness-timeout-3m
Open

fix(desktop): increase backend readiness timeout to 3 minutes#4825
carlospedreira wants to merge 3 commits into
pingdotgg:mainfrom
carlospedreira:fix/backend-readiness-timeout-3m

Conversation

@carlospedreira

@carlospedreira carlospedreira commented Jul 29, 2026

Copy link
Copy Markdown

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 and comment change in desktop backend lifecycle timing; no auth, data, or API surface changes.

Overview
Raises DEFAULT_BACKEND_READINESS_TIMEOUT in DesktopBackendManager from 1 minute to 3 minutes so WSL backends that load the packaged server from /mnt/c can finish startup before readiness polling stops (fixes stuck “Connecting to WSL…” when startup exceeds ~60s).

Polling still completes as soon as /.well-known/t3/environment responds; this only extends the maximum wait. A short comment documents the WSL/mnt/c motivation (#4535).

Reviewed by Cursor Bugbot for commit f876714. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Increase backend readiness timeout from 1 minute to 3 minutes in DesktopBackendManager

Updates DEFAULT_BACKEND_READINESS_TIMEOUT in DesktopBackendManager.ts to accommodate slower WSL backends that need more time to become ready before the timeout triggers.

Macroscope summarized f876714.

WSL backend startup can exceed the one-minute readiness deadline when the
packaged server bundle is loaded through /mnt/c, leaving the app stuck on
"Connecting to WSL..." even though the backend eventually becomes healthy.
Raise the default readiness timeout to 3 minutes; polling still resolves
immediately once the endpoint responds, so fast backends are unaffected.

Fixes pingdotgg#4535

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

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: a095fdde-2ec5-442b-870a-ba5676faba75

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.

@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Jul 29, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 5405ecd

Simple timeout constant increase from 1 to 3 minutes to accommodate slower WSL backends. No behavioral change for fast backends since polling resolves immediately when ready.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

1 participant