You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 Fix splash screen white flash and improve startup error handling (#232)
## Problem
While the splash screen from PR #226 provides instant visual feedback,
two issues remain:
1. **White flash** - Splash window sometimes shows white background
briefly before HTML loads
2. **Silent startup failures** - If the app fails to start, users see
nothing (no window, no error)
## Solution
### Fix White Flash
Set `backgroundColor: '#1f1f1f'` on splash window to match the HTML
background color. This ensures consistent dark background even if HTML
hasn't rendered yet.
### Comprehensive Error Handling
Wrap entire `app.whenReady()` in try/catch to handle all startup
failures:
- Close splash screen if startup fails
- Show error dialog with full error message and stack trace
- Quit app gracefully after showing error
- Users always see what went wrong instead of silent black screen
### Documentation Updates
- Corrected service load time (~100ms, not ~6-13s) in code comments
- Added note that spinner may freeze briefly during service loading
- This is acceptable since splash still provides visual feedback
## Testing
- ✅ TypeScript checks pass
- ✅ ESLint passes (only pre-existing warnings)
- ✅ Manual testing confirms no white flash
- ✅ Error handling tested by introducing deliberate startup error
## Impact
- ✅ No white flash - consistent dark background from first frame
- ✅ Better error UX - users see what went wrong during startup
- ✅ More accurate documentation
## Related
- Builds on PR #226 (splash screen)
- Complements PR #230 (E2E test fixes)
- See issue #231 for future tree-shaking optimization
Simple, reliable improvements without added complexity.
_Generated with `cmux`_
---------
Co-authored-by: Ammar Bandukwala <[email protected]>
0 commit comments