-
Notifications
You must be signed in to change notification settings - Fork 11
🤖 fix: skip splash screen in E2E tests #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
The splash screen was being shown in E2E mode, causing app.firstWindow() to grab the splash window instead of the main window. This made the "Projects" navigation check fail. Fix: Skip splash screen when CMUX_E2E=1
ammar-agent
added a commit
that referenced
this pull request
Oct 13, 2025
## Problem - Splash screen sometimes showed white flash during startup - No user-visible error messages when startup fails - Users see black screen with no feedback if app fails to start ## Solution ### 1. Fix White Flash Added `backgroundColor: '#1f1f1f'` to splash window configuration to match the splash HTML background color (hsl(0 0% 12%)). This eliminates any white flash if HTML loads slowly. ### 2. Comprehensive Error Handling Wrapped entire `app.whenReady()` in try/catch to handle all startup failures: - Close splash screen on error - Show error dialog with full error message and stack trace - Quit app gracefully after showing error - Ensures users always see startup failures instead of silent black screen ### 3. Update Documentation - Corrected service load time comment (~100ms, not ~6-13s) - Added note that spinner may freeze briefly during service loading - This is acceptable since splash still provides visual feedback ## Impact - ✅ No white flash - consistent dark background from first frame - ✅ Better error UX - users see what went wrong during startup - ✅ More accurate documentation of startup timing ## Related - Builds on PR #226 (initial splash screen) - Complements PR #230 (E2E test fixes) - See issue #231 for future tree-shaking optimization The backgroundColor fix and error handling are simple, reliable improvements that don't add complexity. Future performance gains should come from loading less code (tree-shaking) rather than moving work to worker threads.
ammar-agent
added a commit
that referenced
this pull request
Oct 13, 2025
## Problem - Splash screen sometimes showed white flash during startup - No user-visible error messages when startup fails - Users see black screen with no feedback if app fails to start ## Solution ### 1. Fix White Flash Added `backgroundColor: '#1f1f1f'` to splash window configuration to match the splash HTML background color (hsl(0 0% 12%)). This eliminates any white flash if HTML loads slowly. ### 2. Comprehensive Error Handling Wrapped entire `app.whenReady()` in try/catch to handle all startup failures: - Close splash screen on error - Show error dialog with full error message and stack trace - Quit app gracefully after showing error - Ensures users always see startup failures instead of silent black screen ### 3. Update Documentation - Corrected service load time comment (~100ms, not ~6-13s) - Added note that spinner may freeze briefly during service loading - This is acceptable since splash still provides visual feedback ## Impact - ✅ No white flash - consistent dark background from first frame - ✅ Better error UX - users see what went wrong during startup - ✅ More accurate documentation of startup timing ## Related - Builds on PR #226 (initial splash screen) - Complements PR #230 (E2E test fixes) - See issue #231 for future tree-shaking optimization The backgroundColor fix and error handling are simple, reliable improvements that don't add complexity. Future performance gains should come from loading less code (tree-shaking) rather than moving work to worker threads.
ammar-agent
added a commit
that referenced
this pull request
Oct 13, 2025
## Problem - Splash screen sometimes showed white flash during startup - No user-visible error messages when startup fails - Users see black screen with no feedback if app fails to start ## Solution ### 1. Fix White Flash Added `backgroundColor: '#1f1f1f'` to splash window configuration to match the splash HTML background color (hsl(0 0% 12%)). This eliminates any white flash if HTML loads slowly. ### 2. Comprehensive Error Handling Wrapped entire `app.whenReady()` in try/catch to handle all startup failures: - Close splash screen on error - Show error dialog with full error message and stack trace - Quit app gracefully after showing error - Ensures users always see startup failures instead of silent black screen ### 3. Update Documentation - Corrected service load time comment (~100ms, not ~6-13s) - Added note that spinner may freeze briefly during service loading - This is acceptable since splash still provides visual feedback ## Impact - ✅ No white flash - consistent dark background from first frame - ✅ Better error UX - users see what went wrong during startup - ✅ More accurate documentation of startup timing ## Related - Builds on PR #226 (initial splash screen) - Complements PR #230 (E2E test fixes) - See issue #231 for future tree-shaking optimization The backgroundColor fix and error handling are simple, reliable improvements that don't add complexity. Future performance gains should come from loading less code (tree-shaking) rather than moving work to worker threads.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 13, 2025
) ## 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 <ammar@ammar.io>
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.
Problem
E2E tests are flaky because
app.firstWindow()grabs the splash screen instead of the main window. The test expects the "Projects" navigation to be visible, but that only exists in the main window.Solution
Skip splash screen when
CMUX_E2E=1. E2E tests don't need startup feedback and need deterministic window ordering.Testing
E2E tests should now pass consistently.
Generated with
cmux