Repository navigation
Desktop: move OpenBot (Self-Contained) to OpenBot Cloud - #1999
Draft
davidmckayv wants to merge 15 commits into
Draft
davidmckayv wants to merge 15 commits into
davidmckayv wants to merge 15 commits into
Conversation
Exports on an OpenBot on the person's own computer: what an export would hold and free, a bundle in parts with sizes and SHA-256, resumable downloads with Range. Imports on OpenBot Cloud only: a per-import public key a model key is sealed to, resumable part uploads, apply in the background, and a verification that counts what arrived by kind. Connections to apps travel as app and account names only, listed for reconnecting.
…he organization's own store MoveCount carries bytes for files, and the verification compares expectedBytes with foundBytes read from the file store.
The shell side of the move. Desktop signs in to OpenBot Cloud, exports everything from the OpenBot on this computer, uploads it part by part to an import on Cloud, applies it, and checks it there. Only once Cloud's check matches the export's own counts is the move kept and OpenBot removed from this computer, measured before and after to say how much space it freed. Any failure before that leaves this computer as it was. The removal is the uninstaller's "Delete the application data", now also removing OpenBot's own volumes and images on an engine that isn't OpenBot's machine (Docker Desktop kept them before). Settings can ask for the move without stopping OpenBot, and the relay's entry can open Cloud at one of the app's own pages, for Reconnect.
…elf-Contained) After the update, where the setup window would hand itself to the OpenBot running on this computer, it asks the shell once (`move_offer`, telling it whether this build offers OpenBot Cloud). When the move is due, or Settings asked for it, the move's screens show instead, in the first screen's card: - The choice: OpenBot Cloud, recommended and picked, with the space it frees, or keep OpenBot (Self-Contained). Keep is recorded and OpenBot shows. - What moves, counted from the running OpenBot (`move_preview`), the private app connections to reconnect in OpenBot Cloud listed by name, and bringing the AI key along when there is one. - The move, one row per stage (`move:progress`), with Cancel while the browser sign-in waits. - A move that stopped says nothing was removed, with Try again or Keep. - Done: the space freed, a Reconnect per app opening OpenBot Cloud's connections in this window, notes from OpenBot Cloud and anything left behind, and Open OpenBot. Installing OpenBot (Self-Contained) from the first screen records Keep, so a fresh install is never asked. Connected installs never ask. Settings > Computer gains a Move to OpenBot Cloud row, shown when the desktop app says the move is available (`moveToCloud` on `connection`), whose dialog says what happens and asks the desktop app to open the move.
…eed no fake data The part download's bytes can't be an example, so the app's Orval config gives that one operation an empty mock. Without these the generated handlers imported @faker-js/faker, which the app doesn't depend on.
OpenBot (Self-Contained) doesn't list the caller's organizations: on a real 1.1.2 install updated to this build, /api/v2/people/me/organizations answered 404, so the move's confirm screen could never load. It has one organization, which the API names `default`, and the move now asks it there. Failures to read the OpenBot here are logged too.
On a Mac, Podman 6.1's machine inspect names no disk image, only the provider through its configuration folder, so the move offered to free 168 MB of a machine holding 9 GB. The machine's own disk is now found in that provider's data folder, by its exact name, and another machine's beside it is never counted.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most people on OpenBot Desktop run OpenBot (Self-Contained): the app plus OpenBot's server, database and backend on their own computer. After they update to this version, Desktop offers to move them to OpenBot Cloud, once.
The choice. Before Desktop shows OpenBot, it asks: Move to OpenBot Cloud (recommended), or Keep OpenBot (Self-Contained). It says what moves (Bots, conversations, memory, skills, routines, files) and how much space the move frees. Keep is never asked again at launch; Settings still offers the move. Nobody connected to OpenBot Cloud or a company's OpenBot is asked, and neither is a fresh install that picked Self-Contained.
The move. Before the person confirms, Desktop lists the apps they connected here by name: those sign-ins can't safely move, and they reconnect each one on Cloud. Then Desktop:
If anything fails before the check passes, nothing on this computer is removed, and the person can try again or keep Self-Contained. The finished screen says how much space was freed and has a Reconnect entry per app that opens Cloud's Connections page. Cloud's own screens then ask them to connect their AI if they didn't bring their key.
Removing OpenBot is the uninstaller's "Delete the application data", run in the app: the backend OpenBot created, OpenBot's own machine, its files and downloads. It now also removes OpenBot's own volumes and images on an engine that isn't OpenBot's machine (Docker Desktop kept them before, and a new install inherited the old data). Only OpenBot's own: never a volume, image, machine or file of anything else.
Built against the move API in #1998.
Tests: the shell's move against an OpenBot here and an OpenBot Cloud that answer as the API says, over HTTP, with the real uninstall code removing a real installation folder (success frees the space and removes the folder; a check that doesn't match removes nothing); every failure before the check removes nothing; the offer's rules; the relay's entry opening only the app's own pages. The setup window's screens and Settings' row have their own tests.