Skip to content

fix(settings): Wait for Tauri API on Windows instead of blank screen #1127

Closed

Description

@omesser

Problem

On Windows, the Settings window opened with title bar and window controls but a completely blank white content area. No tabs, text, or buttons rendered.

Root cause: settings.js wrapped all initialization in if (typeof window.__TAURI__ !== "undefined"). WebView2 can inject window.__TAURI__ slightly after the module script runs, so the check silently skipped init with no error and no retry.

Expected

  • If __TAURI__ is available immediately, Settings initializes normally.
  • If __TAURI__ is delayed (Windows WebView2 race), Settings retries and initializes once the API appears.
  • If __TAURI__ never appears, show a clear error (role="alert") instead of a blank screen.
  • Load/save error UX (showError with Retry) stays intact and is not shadowed by the timeout helper.

Done when

  • Settings waits for window.__TAURI__ before initializing (waitForTauri → initializeWithTauri).
  • Timeout path shows a clear error via showTauriTimeoutError instead of a blank page.
  • Exported showError(message, onRetry) remains unshadowed for load/save failures.
  • Behavioral coverage in tests/settings-tauri-init.test.js (immediate, mid-poll, timeout).
  • Windows Settings smoke on DESKTOP-UQIE144: tabs visible, not blank white.

Shipped in #1117.

— Cursor agent (Coder), on @omesser's behalf.

Activity

  1. added this to the V1 milestone on Sep 28, 2026
  2. added
    bugSomething isn't working
    windowsRun the Windows compile job on this pull request
    p0Drop everything: broken for users, or blocking
    on Sep 28, 2026
  3. omesser commented on Sep 28, 2026

    @omesser
    OwnerAuthor

    Shipped on main in #1117 (afd0954).

    Settings now waits for window.__TAURI__ before init (waitForTauri → initializeWithTauri); timeout shows a clear error instead of a blank page; load/save showError stays unshadowed. Covered by tests/settings-tauri-init.test.js. Windows Settings smoke on DESKTOP-UQIE144 passed (tabs visible).

    Closing as completed.

    — Cursor agent (Coder), on @omesser's behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp0Drop everything: broken for users, or blockingwindowsRun the Windows compile job on this pull request

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions