fix(desktop): increase backend readiness timeout from 10s to 30s#1979
Conversation
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
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: 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. |
|
also working on startup time improvements! |
What Changed
DEFAULT_TIMEOUT_MSinapps/desktop/src/backendReadiness.tsfrom10_000to30_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):
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
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_MSin backendReadiness.ts from 10,000ms to 30,000ms, giving the backend more time to become ready before timing out.Macroscope summarized e273835.