The renderer in v3.0.0 / v3.0.1 is showing a blank window for at
least one user, with no visible error. React's ErrorBoundary only
catches AFTER mount — anything that throws BEFORE createRoot()
completes (preload contract mismatch, contextBridge mutation
rejection, ESM resolution failure, missing #root) just dies silently.
Wrapped main.tsx with three safety nets:
- window.addEventListener('error', …) + 'unhandledrejection' →
paint the error message + stack directly into #root as a red <pre>.
- wrapWindowApi() in a try/catch — if contextBridge tightens its
mutation policy on a future Electron release and mutation starts
throwing, the activity indicator silently no-ops instead of taking
the whole UI with it.
- createRoot() in a try/catch — if #root is gone or React fails to
mount, paintFatalError surfaces the failure with a useful label.
So next time someone hits the grey screen they'll see "FrameCAD
failed to start. <reason>." with a stack — we can fix it from that
in one round instead of asking for DevTools output.
v3.0.2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>