Skip to content

Mac window on OpenBot's ground from the first frame, and no 2-minute pause on a fresh Windows install - #1562

Merged
davidmckayv merged 1 commit into
mainfrom
fix/desktop-first-paint-and-install-stall
Nov 13, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
fix/desktop-first-paint-and-install-stall

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What a person saw

  1. Mac: grey, then white, before setup paints. On a fresh Mac in Dark Mode, the OpenBot window showed a blank dark grey (#1b1b1b, the system's own window background, not the setup screens' ground) for 0.2 to 0.5 s, often followed by 1 to 3 pure white frames, before the setup page painted. In light, it was blank white for about 0.4 s. Recorded at 30 fps on main before and after Windows first install: plain words while WebView2 installs, and never a blank window #1544; Windows first install: plain words while WebView2 installs, and never a blank window #1544's cover is Windows only.
  2. Windows: the Installing page sits still for about 2 minutes. On a fresh box the page stayed on "Output folder: C:\Users...\OpenBot" with the bar still for about two minutes.

Why

  1. On macOS the main window was built with no background of its own. Until the page painted, the window showed AppKit's default background, and WKWebView then drew its default white before the first frame of the page. Only Windows built the window on the setup ground (Windows first install: plain words while WebView2 installs, and never a blank window #1544).
  2. The install's first step stops anything still running from this installation's bundled CLI (OPENBOT_STOP_BUNDLED_CLI, feat(desktop): standalone OpenBot with local CopilotKit Intelligence, from the app alone #832 and Stop the bundled CLI from the 32-bit Windows installer before replacing node.exe #1071). It ran on every install, so on a fresh box it started PowerShell and a WMI process query to look under a cli-bundle folder that did not exist yet. That step is where the page sat for about two minutes, under nsExec::Exec, which prints no line and leaves the bar still.

What changed

Mac first paint

  • The main window is built on the setup screens' ground on macOS too (light #ededf5, dark #0d0b13, the same colours the title bar already takes on the setup page), through Tauri's background_color on the builder. On macOS that sets the window's background (NSWindow.backgroundColor) and, in wry 0.54.2 and later (this build has 0.57.1), turns off WKWebView's own white (drawsBackground) and sets the colour behind the page (underPageBackgroundColor), so the ground shows from the first frame until the page paints (wry 0.54.2 notes, Tauri builder).
  • Light or dark before any page has said: the app's last light or dark when it has one, as before, and otherwise the system's, now read on macOS from the application's effective appearance matched to Aqua or Dark Aqua (effectiveAppearance, bestMatch(from:)), as tao reads it for a window's theme. Before this it always said light off Windows.
  • Windows is unchanged: same builder line, same cover.

Windows install

  • The bundled CLI's stop runs only when $INSTDIR\cli-bundle exists (IfFileExists DIR\*.*, NSIS 4.9.4.10). Nothing can run from a folder that is not there, and Windows keeps a running program's file, so its folder, until it exits. An update or a reinstall over a bundled CLI has the folder and stops it exactly as before; a fresh install, or one without a bundled CLI, skips it. Same on uninstall.

Tests

  • the_main_window_is_built_on_the_setup_ground_on_macos_and_windows (main.rs): the builder's background_color is set on macOS and Windows, before build(), and its colours are the title bar's. Red with main's builder line (Windows only), green here.
  • a_dark_mac_builds_the_window_on_the_dark_ground (first_paint.rs, macOS): Dark Aqua and Vibrant Dark read as dark, Aqua and Vibrant Light as light, with AppKit's own appearances.
  • the_bundled_cli_stop_runs_only_when_there_is_a_cli_bundle_to_stop (recorder_install.rs): everything the stop runs sits inside the cli-bundle check, it is the folder the script searches, and the stop still runs on every install (after the old version is removed) and uninstall. Red with main's hooks.nsh, green here.

To check before merge

  • Mac: fresh HOME, isolated dev build, system in Dark then Light, window recorded at 30 fps from launch: the first frame is the setup ground, with no grey and no white frame, in both. Then the OpenBot app after setup in both modes, and a resize.
  • Windows: fresh box: the Installing page no longer sits on "Output folder". Update over an installed OpenBot that ran Intelligence (bundled CLI): the update still stops node.exe and replaces it. Uninstall the same.

@davidmckayv
davidmckayv force-pushed the fix/desktop-first-paint-and-install-stall branch 3 times, most recently from 582be31 to 647160c Compare November 13, 2026 21:44
… CLI stop on a fresh install

macOS built the main window with no background of its own, so before the setup page painted it showed the system's grey and then WKWebView's white. It is now built on the setup screens' ground in light or dark, as Windows already was, with the system's appearance read from AppKit when OpenBot has not said yet.

The Windows installer's first step started PowerShell and WMI to stop the bundled CLI even when this installation had no cli-bundle folder, which held the Installing page still for about two minutes on a fresh box. It now runs only when that folder exists, so updates and reinstalls still stop it.
@davidmckayv
davidmckayv force-pushed the fix/desktop-first-paint-and-install-stall branch from 647160c to 9158c83 Compare November 13, 2026 21:58
@davidmckayv
davidmckayv merged commit 6199cb1 into main Nov 13, 2026
27 checks passed
@davidmckayv
davidmckayv deleted the fix/desktop-first-paint-and-install-stall branch November 13, 2026 22:11
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