From 5405ecd952b4369bf6089f95e337e39be65fc746 Mon Sep 17 00:00:00 2001 From: Carlos Pedreira Date: Wed, 29 Jul 2026 10:23:31 +0100 Subject: [PATCH] fix(desktop): increase backend readiness timeout to 3 minutes 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 #4535 Co-Authored-By: Claude Fable 5 --- apps/desktop/src/backend/DesktopBackendManager.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/backend/DesktopBackendManager.ts b/apps/desktop/src/backend/DesktopBackendManager.ts index e3a4de661ac..2dbb0459eba 100644 --- a/apps/desktop/src/backend/DesktopBackendManager.ts +++ b/apps/desktop/src/backend/DesktopBackendManager.ts @@ -58,7 +58,10 @@ const MAX_RESTART_DELAY = Duration.seconds(10); // failures may instead provide their own larger retryLimit when they should // self-heal for a while but must not leave the app connecting forever. const MAX_PREFLIGHT_FAILURE_ATTEMPTS = 5; -const DEFAULT_BACKEND_READINESS_TIMEOUT = Duration.minutes(1); +// WSL backends can take well over a minute to become ready when the packaged +// server bundle is loaded through /mnt/c (see #4535). Readiness polling still +// resolves as soon as the endpoint responds, so fast backends are unaffected. +const DEFAULT_BACKEND_READINESS_TIMEOUT = Duration.minutes(3); const DEFAULT_BACKEND_READINESS_INTERVAL = Duration.millis(100); const DEFAULT_BACKEND_READINESS_REQUEST_TIMEOUT = Duration.seconds(1); const DEFAULT_BACKEND_TERMINATE_GRACE = Duration.seconds(2);