Skip to content

The setup window never stays blank: it shows a problem, recovers, and asks about the move at once - #2068

Merged
davidmckayv merged 2 commits into
mainfrom
fix/setup-never-blank
Nov 23, 2026
Merged

davidmckayv merged 2 commits into
mainfrom
fix/setup-never-blank

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What the person saw

On a Mac running OpenBot Desktop 1.1.2 (Self-Contained, on Docker Desktop), 1.2.0-rc.3 was installed over it. The setup window opened as a plain, empty page and stayed that way. It happened on two launches.

Why

  • rc.3 holds every start and update until the person answers "Move to OpenBot Cloud?". A launch with a saved setup asks that first.
  • The shell answered [move] offer: due true 15.3 seconds after launch (0.25 seconds on another computer). Before answering, move_offer walked every one of OpenBot's folders to say how much the move frees, and this computer had two older installs on its disk.
  • After the answer, nothing happened: no Start, no update, no Continue or Keep. The page drew nothing over the window's ground, yet its code was running, since it had asked the question. The log can't tell which of two causes it was:
    • a screen that failed to draw: there was no error boundary, so React took every screen away and left the bare ground; or
    • the webview stopped painting: on macOS nothing noticed a setup page that never sent its first heartbeat (the "Getting OpenBot ready" cover exists only on Windows).
  • Either way there was no way out: no timeout, no reload, no message and no log line.

The fix

Behaviour only. It reuses the setup window's existing failure box and troubleshooting logs; there is no new visual design.

  1. Error boundary (desktop/src/PageError.tsx, main.tsx). Every screen of the setup window is wrapped. A screen that fails to draw shows "OpenBot hit a problem" in the window's own "That didn't finish" box, with Reload and the existing Copy logs / Save to a file. The error goes to the Desktop log through a new page_error command, and so do uncaught errors and unhandled rejections (once each, at most 20 per page). The heartbeat runs outside the boundary, so the problem sheet counts as a live screen and stays up until the person reloads.
  2. Native watchdog on every platform (stall::PageWatch, desktop_stall, the page-load handler in main.rs). It extends the existing heartbeat and stall watch; it is not a second mechanism. With the window on screen:
    • a setup page that hasn't answered with something drawn 10 seconds after it finished loading (30 seconds if it never finishes) is reloaded once;
    • so is a page that goes 20 seconds without a heartbeat, or keeps answering with nothing drawn;
    • if it is still stuck after the reload, a native alert says "OpenBot's window isn't responding", with Restart (restarts the app and leaves OpenBot running, as the restart after an update does) and Get logs (the menu's Get Troubleshooting Logs…).
    • Off screen, minimised, covered, or a look that couldn't read the window: nothing is done. OpenBot's own page in the window and the Shutting down screen are never reloaded.
    • Windows' "Getting OpenBot ready" cover is unchanged. It has no buttons, so the alert is what offers Restart and Get logs on every platform.
  3. The move question is answered at once (desktop_move.rs, MoveToCloud.tsx). move_offer returns due or not due straight away. OpenBot's files are measured once per run on their own thread, and the window asks for the size with a new move_footprint command, which waits up to 20 seconds. The move screen already shows without the size (footprintBytes null) and now fills it in when it arrives. The log says when the question was asked, how long the answer took, and how long sizing took.
  4. The log says which screen shows. The heartbeat now carries the screen's heading and whether anything is drawn. Each time that changes, the Desktop log says so, for example [ui] the setup window shows "Move to OpenBot Cloud?" or [ui] the setup window shows nothing.

Tests

Each regression test fails on main and passes with the fix.

  • desktop/src/PageError.test.tsx (happy-dom, the whole window as main.tsx mounts it): a screen that fails to draw shows "OpenBot hit a problem" with Reload, Copy logs and Save to a file, and calls page_error. Uncaught errors and unhandled rejections reach the log once each. A window with nothing drawn says so in its heartbeat. On main's main.tsx the screen's error escapes and the window is left empty (2 fail).
  • desktop/src/setupLayout.browser.test.ts, "a screen that fails to draw" (real Chromium and WebKit, light and dark): the sheet's heading, sentence and failure box are laid out and in view, the buttons are Reload, Copy logs and Save to a file, and page_error is called. It fails on main (2 fail in Chromium).
  • tests::the_move_question_is_answered_at_once_however_long_sizing_takes (Rust, mock runtime, beside the move tests): with sizing slowed by 3 seconds, move_offer answers due in under a second without the size. The size then arrives through move_footprint, and a second answer carries it. On main the answer took 3.07 seconds.
  • stall::tests (plain Rust, the watchdog's state machine): never answering means one reload and then the alert; a heartbeat resets the watch; a page that answers with nothing drawn is stuck too; off screen, unread, elsewhere or quitting is never acted on. desktop_stall::tests::a_setup_page_that_never_answers_is_reloaded_then_the_person_is_told runs the same through the calls the window and page make.
  • MoveToCloud.test.tsx: the question shows at once without the size, and the size joins it once measured.
  • heartbeat.test.ts: updated for the screen and drawn fields.

Runs:

  • cargo test --locked --lib --bins: 1374 passed (lib), 397 passed (bin), 0 failed
  • cargo fmt --check: clean
  • cargo clippy --all-targets -- -D warnings: no findings in changed code. Two doc_lazy_continuation errors in the untouched local_eval_ipc_tests.rs come from the local toolchain being newer than CI's.
  • desktop tsc --noEmit: clean. Desktop unit tests: 736 passed, 0 failed.
  • Desktop browser layout suite, Chromium (macOS): 163 passed, 1 failed. The failure is "with scrollbars that take room, as Windows draws them", which fails the same way on main on this Mac (overlay scrollbars) and passes in CI's Linux Chromium job.
  • WebKit (macOS): the new test passes in light and dark. In one long run of the whole suite, WebKit itself stalled and later tests timed out. Run again in a fresh session, those tests pass on this branch (26 of 26) as on main.
  • Screenshots of the new sheet were checked by eye in Chromium and WebKit, light and dark. It is the setup window's own sheet and failure box in its own colours.

… asks about the move at once

On a Mac, 1.2.0-rc.3 installed over 1.1.2 left the setup window a plain ground with nothing on it,
across two launches. The shell answered the move question 15.3 seconds after launch (it walked
every one of OpenBot's folders to size the move first), and after that the page drew nothing while
its code still ran. Nothing caught a screen that failed to draw, nothing on macOS noticed a page
that never painted, and nothing reached the log.

- The setup window's tree sits in an error boundary. A screen that fails to draw shows "OpenBot hit
  a problem" on the window's own failure box, with Reload and the troubleshooting logs. The error,
  uncaught errors and unhandled rejections go to the Desktop log through a new page_error command.
- The setup page is watched on every platform (stall::PageWatch, beside the existing UiWatch). A
  page that hasn't answered with something drawn 10s after it loaded, or goes quiet for 20s, with
  the window on screen, is reloaded once. Still quiet, a native alert says so with Restart and Get
  logs. The Windows cover is unchanged.
- move_offer answers at once. The size of OpenBot's files is measured once a run on its own thread,
  and the window asks for it with move_footprint (capped at 20s); the move screen shows without the
  size until it arrives. The log says when the question was asked, how long the answer took, and
  how long sizing took.
- The heartbeat carries the screen's heading and whether anything is drawn, and the log says which
  screen the setup window shows each time it changes.
@davidmckayv
davidmckayv force-pushed the fix/setup-never-blank branch from 30d3cf2 to dfba1c1 Compare November 23, 2026 18:51
@davidmckayv
davidmckayv merged commit 2337a62 into main Nov 23, 2026
38 checks passed
@davidmckayv
davidmckayv deleted the fix/setup-never-blank branch November 23, 2026 19:02
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