Skip to content

fix(desktop): increase backend readiness timeout from 10s to 30s#1979

Merged
juliusmarminge merged 1 commit intopingdotgg:mainfrom
rowalth:fix/increase-backend-readiness-timeout
Apr 13, 2026
Merged

fix(desktop): increase backend readiness timeout from 10s to 30s#1979
juliusmarminge merged 1 commit intopingdotgg:mainfrom
rowalth:fix/increase-backend-readiness-timeout

Conversation

@rowalth
Copy link
Copy Markdown
Contributor

@rowalth rowalth commented Apr 13, 2026

What Changed

DEFAULT_TIMEOUT_MS in apps/desktop/src/backendReadiness.ts from 10_000 to 30_000.

Why

The 10-second timeout is too tight for many machines. The backend consistently needs 10–12s to start (Node.js init → SQLite → migrations → HTTP listen), so the desktop gives up before the backend is ready — sometimes by less than a second.

Log evidence (v0.0.17, macOS x64):

  • Last successful start: 9.18s (0.82s under the limit)
  • Every cold start after that: 10.5–12s → timeout
  • Backend reaches Listening 0.35–2s after the desktop gives up

30s gives comfortable headroom without affecting fast machines — the readiness check still polls every 100ms and resolves immediately when the backend responds.

Fixes #1916

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Low Risk
Low risk: only adjusts a default timeout value for desktop backend readiness polling, with no logic or data-handling changes.

Overview
Increases the default backend readiness wait timeout in the desktop app from 10s to 30s, reducing startup failures on slower/cold machines while keeping the existing polling behavior unchanged.

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

Note

Increase backend readiness timeout from 10s to 30s in desktop app

Raises DEFAULT_TIMEOUT_MS in backendReadiness.ts from 10,000ms to 30,000ms, giving the backend more time to become ready before timing out.

Macroscope summarized e273835.

The 10-second timeout is too tight for many machines. Log analysis shows
the backend consistently needs 10-12s to start (Node.js init + SQLite +
migrations + HTTP server), causing the desktop to give up before the
backend is ready.

Reported by multiple users after upgrading to v0.0.17.

Fixes pingdotgg#1916
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

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

Run ID: 372a8bae-ab85-46ef-9c09-677cc86ac383

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@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 Apr 13, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 13, 2026

Approvability

Verdict: Approved

Single-line change increasing a timeout constant from 10s to 30s. This is a simple, low-risk configuration tweak with no logic changes or side effects beyond allowing more time for backend readiness checks.

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

@juliusmarminge juliusmarminge enabled auto-merge (squash) April 13, 2026 08:07
@juliusmarminge
Copy link
Copy Markdown
Member

also working on startup time improvements!

@juliusmarminge juliusmarminge merged commit 850c912 into pingdotgg:main Apr 13, 2026
12 checks passed
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

Development

Successfully merging this pull request may close these issues.

[Bug]: T3 Code fails to start after upgrade from 0.0.15 to 0.0.17 - backend readiness timeout

2 participants