fix(desktop): keep probing backend readiness while the process is alive #5526
Mergedlgwacker(GitHub profile, opens in a new tab)merged 23 commits into
main fromrefs/pull/5526/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/desktop/src/backend/DesktopBackendManager.ts lines 575 to 590OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -578,0 +570,21 @@570+ // update) can exceed the initial readiness budget while the backend is571+ // about to come up moments later; a one-shot probe left the app stuck572+ // on "Connecting to WSL…" forever even though the backend kept running573+ // and became healthy. Each round gets a fresh budget, and the forked574+ // loop is torn down with the run scope once the child exits.575+ const probeReadiness = Effect.fn("desktop.backendProcess.probeReadiness")(function* () {576+ const outcome = yield* waitForHttpReady({577+ executablePath: options.executablePath,578+ entryPath: options.entryPath,579+ cwd: options.cwd,580+ httpBaseUrl: options.httpBaseUrl,581+ timeout: options.readinessTimeout ?? DEFAULT_BACKEND_READINESS_TIMEOUT,582+ }).pipe(Effect.result);583+584+ if (Result.isSuccess(outcome)) {585+ yield* options.onReady?.() ?? Effect.void;586+ return true;587+ }588+ yield* options.onReadinessFailure?.(outcome.failure) ?? Effect.void;589+ return false;590+ });
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge merged this160c76c
juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
be66c833-ab42-437e-a7e3-1952f7688b0bYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
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