[PR #4438] [CLOSED] [GUI] Show the window after the first paint instead of a white page #5047

Closed
opened 2026-11-07 16:32:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4438
Author: @xvcezrqpbxtpzblrt
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: desktop/no-white-flash-027


📝 Commits (1)

  • 557e09f [GUI] Show the window when the page has painted, not while it is still blank

📊 Changes

3 files changed (+116 additions, -9 deletions)

View changed files

📝 apps/desktop/src-tauri/src/main.rs (+45 -7)
📝 apps/desktop/src-tauri/tauri.conf.json (+19 -1)
📝 apps/host/src/main.tsx (+52 -1)

📄 Description

## Problem

On a cold start the window shows the web view's default white page until the host is up and React has painted: a white flash on every launch, longer on a slow disk.

Result

  • The window is created hidden, and shown when the page says it has painted (a small ready signal from main.tsx once the first screen is committed), with a 12 s fallback in the page and a 15 s one in the shell so a failure still shows a window.
  • While it is hidden, a second launch does not open a second window.
  • The page remembers the window was hidden and asks the shell to show it, so a page that reloads later does not stay invisible.

Validation

  • Built and run on Windows: window appears with the first painted screen, no white frame.
  • cargo check clean; the Tauri capability for the show/focus commands is in tauri.conf.json.

Limits and the trade-off

  • Not run on macOS or Linux, and not measured on a slow disk: the worst case is a blank (no window) for up to 12–15 s instead of a white window for a few seconds.
  • If the owner prefers the default path untouched, an inline background colour and a static skeleton in index.html would remove the white flash without hiding the window; this branch is the more thorough version of that.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4438 **Author:** [@xvcezrqpbxtpzblrt](https://github.com/xvcezrqpbxtpzblrt) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `desktop/no-white-flash-027` --- ### 📝 Commits (1) - [`557e09f`](https://github.com/Niko1221/Strata/commit/557e09fc80eae9a96836646cecd269d7d69c1475) [GUI] Show the window when the page has painted, not while it is still blank ### 📊 Changes **3 files changed** (+116 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `apps/desktop/src-tauri/src/main.rs` (+45 -7) 📝 `apps/desktop/src-tauri/tauri.conf.json` (+19 -1) 📝 `apps/host/src/main.tsx` (+52 -1) </details> ### 📄 Description ## Problem On a cold start the window shows the web view's default white page until the host is up and React has painted: a white flash on every launch, longer on a slow disk. ## Result - The window is created hidden, and shown when the page says it has painted (a small ready signal from `main.tsx` once the first screen is committed), with a 12 s fallback in the page and a 15 s one in the shell so a failure still shows a window. - While it is hidden, a second launch does not open a second window. - The page remembers the window was hidden and asks the shell to show it, so a page that reloads later does not stay invisible. ## Validation - Built and run on Windows: window appears with the first painted screen, no white frame. - `cargo check` clean; the Tauri capability for the show/focus commands is in `tauri.conf.json`. ## Limits and the trade-off - Not run on macOS or Linux, and not measured on a slow disk: the worst case is a blank (no window) for up to 12–15 s instead of a white window for a few seconds. - If the owner prefers the default path untouched, an inline background colour and a static skeleton in `index.html` would remove the white flash without hiding the window; this branch is the more thorough version of that. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:32:18 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5047
No description provided.