Skip to content

fix(renderer): recover from bounded process failures#894

Closed
luoye520ww wants to merge 1 commit into
KunAgent:developfrom
luoye520ww:codex/fix-885-render-process-recovery
Closed

fix(renderer): recover from bounded process failures#894
luoye520ww wants to merge 1 commit into
KunAgent:developfrom
luoye520ww:codex/fix-885-render-process-recovery

Conversation

@luoye520ww

Copy link
Copy Markdown
Collaborator

Summary

Add bounded renderer-process recovery for the white-screen failure tracked by #885.

Changes

  • Handle Electron render-process-gone and unresponsive events in the main process.
  • Reload at most three times inside a five-minute window with a short delay.
  • Ignore clean exits, deduplicate concurrent failures, cancel pending reloads when the renderer responds or finishes loading, and stop retrying after the budget is exhausted.
  • Keep the policy and reducer pure/testable; only the small BrowserWindow adapter owns timers and reload side effects.

Part of #885. This is intentionally separate from the React ErrorBoundary and Kun runtime lifecycle PRs.

Tests

  • npm.cmd exec vitest run src/main/renderer-process-recovery.test.ts
  • npm.cmd run typecheck
  • npm.cmd run lint -- --quiet
  • npm.cmd run build
  • git diff --check

@luoye520ww

Copy link
Copy Markdown
Collaborator Author

Superseded by consolidated runtime recovery PR #947, which passed Typecheck, Linux, macOS, and Windows packaged checks. Closing this duplicate to keep the review surface focused.

@luoye520ww luoye520ww closed this Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant