2 months ago
fc280cdThe "start hidden, show on first paint" protection was silently dead. `visible: false` lived only in the base tauri.conf.json, but every platform override redefines the whole `app.windows` array, and Tauri merges platform config with RFC 7396 JSON Merge Patch — where an array in the patch replaces the base array wholesale rather than merging per window. `visible` therefore fell back to its default of true on every desktop platform (taking `center` with it), so the window was on screen for the entire webview load and `window_ready` → `window.show()` was a no-op. The exposed white frame came from the WebView's default opaque white surface, reinforced on macOS by an NSWindow background of `windowBackgroundColor` (near-white in Light appearance). Repeat `visible:false`, `center`, and a dark `backgroundColor` in every platform window object, pin the macOS NSWindow backing to the app shell's dark surface, declare `color-scheme` so the engine's default canvas is dark before any CSS loads, and render a dark app-shell skeleton instead of nothing while the library probe is in flight. A Rust test asserts every platform window carries these keys so the array-replacement trap cannot silently return. Making the window genuinely start hidden exposed a latent defect in the reveal path: the request was scheduled inside requestAnimationFrame, and macOS suspends animation frames for a hidden WebView, so the app ran with no window at all (verified against a dev build). Arm a short timer alongside the frame so the reveal always goes out, with the frame still winning when frames are produced. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Parentc8d36ba