Commit 1ff76bb
committed
🤖 Add splash screen for instant startup feedback
## Problem
Users see dock icon but no window for 6-13s during app startup (varies by machine).
Even with lazy-loaded services (#223), the renderer makes IPC calls on mount which
requires services to be loaded first, so the main window can't appear until everything
is ready.
## Solution
Added native splash screen that appears instantly (<100ms) while services load.
## Implementation
**Three-phase startup:**
1. **Show splash** - Native BrowserWindow with static HTML (<100ms)
- No React, no IPC, no heavy dependencies
- Matches app theme colors from colors.tsx
- Shows "Loading services..." with spinner
2. **Load services** - Happens while splash is visible (~6-13s)
- Config, IpcMain, AI SDK, tokenizer modules
- User gets instant visual feedback
3. **Show main window** - Close splash, reveal app
- Services guaranteed ready when window appears
- Main window uses "ready-to-show" event to avoid white flash
## Changes
- **Added `static/splash.html`** - Lightweight loading screen matching app theme
- **Modified `src/main.ts`** - Three-phase startup with splash screen
- **Updated `Makefile`** - Copy splash.html to dist during build
## Benefits
- ✅ Instant visual feedback (<100ms vs 6-13s black screen)
- ✅ No user confusion ("is it broken?")
- ✅ Services guaranteed ready (no race conditions)
- ✅ Clean transition to main window
- ✅ All tests pass (410 tests)
_Generated with `cmux`_1 parent fa61ff6 commit 1ff76bb
3 files changed
+141
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
185 | 224 | | |
186 | 225 | | |
187 | 226 | | |
| |||
218 | 257 | | |
219 | 258 | | |
220 | 259 | | |
| 260 | + | |
221 | 261 | | |
222 | 262 | | |
223 | 263 | | |
224 | 264 | | |
225 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
226 | 271 | | |
227 | 272 | | |
228 | 273 | | |
| |||
278 | 323 | | |
279 | 324 | | |
280 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
281 | 330 | | |
| 331 | + | |
282 | 332 | | |
283 | 333 | | |
284 | 334 | | |
| |||
301 | 351 | | |
302 | 352 | | |
303 | 353 | | |
304 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
305 | 358 | | |
306 | 359 | | |
307 | 360 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
0 commit comments