Repository navigation
fix(desktop): a dead main renderer reloads instead of leaving a blank window - #123
Merged
Merged
Conversation
… window The main window only reloaded for four render-process-gone reasons, and nothing noticed a renderer that vanished without that event or hung. On 2026-10-23 the main renderer died and the window stayed mapped and blank for over a day; about 20 backend restarts never revived it, because handleBackendReady skips creation whenever a window exists. Every render-process-gone reason except clean-exit now reloads, a renderer unresponsive for 30 s is crashed and reloaded, and a 30 s liveness check plus every backend-ready reloads a main window whose renderer is crashed or has no process. All triggers share the existing 3-per-minute reload budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 24, 2026
jayleaton
marked this pull request as ready for review
October 24, 2026 07:00
jayleaton
added a commit
that referenced
this pull request
Oct 24, 2026
Branch pushes evicted main's pending nightly from its concurrency group, so the nightly carrying #123/#125/#126 was cancelled twice and never shipped, yet a cancelled run looked neutral to the health check. Cancelled runs of the nightly release on main now count as failures; a cancelled sync still does not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The installed desktop app's main renderer died on 2026-10-23 at about 02:01 UTC and the window stayed mapped and blank for over a day, until a manual Reload. The main process and backend kept running, and about 20 backend restarts in that time never revived the window.
Summary
isCrashed(), orgetOSProcessId() === 0while not loading.handleBackendReadyused to return early whenever a main window existed (createMainIfBackendReady). It now revives a dead renderer first.Evidence
vp test run apps/desktop/src/window/DesktopWindow.test.tson dev-box (Linux):recovers killed renderers within the reload budget and skips clean exits:expected 4 to equal 5(alaunch-failedexit didn't reload)revives a main window whose renderer vanished when the backend comes back:expected 1 to equal 2crashes and reloads a renderer that stays unresponsive: no listenervp run check:changedpasses: format, lint, knip, typecheck for 2 packages, and tests.Not verified against a live Electron renderer crash. The tests drive fake webContents through the same events and calls.
Merge Danger
Door: two-way. Code-only. Reverting it brings back the old reload rules.
Blast Radius: desktop
Only Electron main-window recovery is affected. The worst case is an extra reload of a renderer that
getOSProcessId()briefly reports as 0 while it isn't loading, limited to 3 per minute. Web and mobile are unaffected.Bottom of a 3-PR stack: this PR, then updater/evidence, then the web unpaired-load fix.
Model: Claude Opus 5.5 (claude-opus-5-5) via Claude Code in T3 Code.
🤖 Generated with Claude Code