Skip to content

fix: navigate main window after bridge ready to prevent white screen#398

Open
AspasZhang wants to merge 1 commit into
lsdefine:mainfrom
AspasZhang:fix/setup-whitescreen-navigate
Open

fix: navigate main window after bridge ready to prevent white screen#398
AspasZhang wants to merge 1 commit into
lsdefine:mainfrom
AspasZhang:fix/setup-whitescreen-navigate

Conversation

@AspasZhang
Copy link
Copy Markdown
Contributor

Problem

When the setup window starts the bridge, the main window shows a white screen because it was created before the bridge was running and failed to load http://127.0.0.1:14168/.

Fix

After bridge becomes ready in start_bridge_with_config, navigate the main window to reload the bridge URL, then show it and hide the setup window. All window switching logic is now handled on the Rust side.

Changes

  • Added app_handle: tauri::AppHandle parameter to start_bridge_with_config
  • After port ready: navigate main window → show + focus → hide setup window

When setup window starts the bridge, the main window was already created
with URL http://127.0.0.1:14168/ but failed to load (bridge not running yet).
After bridge becomes ready, we now navigate the main window to reload the
bridge URL before showing it, preventing the white screen issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant