Skip to content

Keep the window on the move to OpenBot Cloud until it ends, and never show a browser's raw network error - #2058

Merged
davidmckayv merged 1 commit into
mainfrom
fix/move-keeps-window-and-no-raw-network-error
Nov 23, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
fix/move-keeps-window-and-no-raw-network-error

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What happened

Moving from OpenBot (Self-Contained) to OpenBot Cloud in OpenBot Desktop on a Mac: the person signed in to OpenBot Cloud in the browser, came back to the window, typed "hello world" on the home screen and got a raw red "Load failed" under the composer. Seconds later the window reloaded to OpenBot Cloud's "Agree to the terms", and after agreeing everything worked.

Why

  • The window left the move. Coming back to the window (a Dock click, the tray's Open, a second launch or a notification) asks the desktop app to show whichever OpenBot applies. Until the move records OpenBot Cloud as the choice, that is the OpenBot on this computer whenever it is up. The restore only held back while setup's own startup lock was taken, and the move never takes it: it keeps its own "running" flag that nothing else read. So the click replaced the move's screens with the local app, and the move then removed that app's server. The home screen's send got no answer.
  • The raw words. The shared fetch handed the browser's own error through as it was ("Load failed" in WebKit, "Failed to fetch" in Chromium), and home shows a failed start's message under the composer. Every screen that shows a failed request's message could show those words.
  • A weak spot in the terms gate. The terms read treated any 404 other than "person not found" as "this OpenBot has no terms", an organization not found included, which would let someone past the terms on OpenBot Cloud.

The fix

Behaviour only; nothing looks different apart from the words of that one line.

  1. Desktop: while a move is running, bringing the window back shows it as it is and never changes its page. When a move ends, moved or not, a window that is not on setup goes back to setup, which opens the OpenBot now chosen: OpenBot Cloud after a move, whose own gate asks for its terms first.
  2. App: a request that gets no answer now fails with OpenBot's own sentence, "Couldn't reach OpenBot. Check your connection and try again.", with the browser's error kept as its cause. It is still a TypeError, so the connection-lost tracking that relies on that keeps working. A request the page cancelled is handed back as before. This covers every screen, not only home.
  3. App: the terms read takes only the API's plain not found (no code, or NOT_FOUND) as an OpenBot without terms. Any other refusal holds the person at the terms screen, which offers Try again.

Tests

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

  • Desktop (Rust, Tauri's mock runtime, beside the existing restore tests):
    • a_dock_click_during_a_move_leaves_the_window_on_the_move: with a move running and the local app up, a restore leaves the window on setup and still brings it forward; once the move is over, a restore decides as before. On main the window went to the local app.
    • a_move_that_ends_sends_the_window_back_to_setup: a move that ends with the window on the local app sends it back to setup. On main it stayed on the local app.
  • App, real browser, Chromium and WebKit, light and dark (app/tests/home-no-answer.test.tsx, added to the WebKit CI job): the app's own home route sends "hello world", the request that creates the conversation is failed at the network, and the line under the composer reads OpenBot's sentence. On main it read "Failed to fetch" in Chromium and "Load failed" in WebKit.
  • App, real browser, Chromium and WebKit (app/tests/service-terms.test.tsx): the terms read answering 404 ORGANIZATION_NOT_FOUND shows "Agree to the terms" first, then the person agrees and goes on. On main they went straight to Settings.
  • Two existing tests' stand-in servers (sign-in-after-sign-out, no-organization) answered every address they didn't know, the terms read included, with "organization not found", which the old reader took as "no terms". They now answer the terms read as an OpenBot without terms does (200, nothing to agree to).
  • Also run: all desktop Rust tests (cargo test --lib --bins), cargo fmt, cargo clippy --all-targets -D warnings (nothing in the changed code; a newer local clippy flags one untouched test file's doc comment), the desktop unit tests and typecheck, the app's tests and the repository's copy guards, the app typecheck and Biome, and the touched browser files whole in both engines.

The home screen's error line keeps its place and style; only the words change (checked side by side in Chromium and WebKit, light and dark).

… show a browser's raw network error

Moving to OpenBot Cloud, a Dock click after the browser sign-in sent the window to the OpenBot on
this computer while the move was still running. The move then removed it, and a message sent from
its home showed the browser's own "Load failed" under the composer.

- Desktop: while a move runs, bringing the window back shows it as it is. When a move ends, a
  window that left setup goes back to setup, which opens the OpenBot now chosen.
- App: a request that gets no answer fails with OpenBot's own sentence, still as a TypeError so
  connection-lost tracking keeps working.
- App: the terms read takes only a plain not found as an OpenBot without terms; any other refusal
  holds the person at the terms.
@davidmckayv
davidmckayv force-pushed the fix/move-keeps-window-and-no-raw-network-error branch from 6bcca57 to f2f06a4 Compare November 23, 2026 15:52
@davidmckayv
davidmckayv merged commit 7344763 into main Nov 23, 2026
50 checks passed
@davidmckayv
davidmckayv deleted the fix/move-keeps-window-and-no-raw-network-error branch November 23, 2026 16:04
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