Skip to content

Choose which organization a move goes into, and move Bots between organizations - #2139

Merged
davidmckayv merged 4 commits into
mainfrom
fix/move-choose-organization
Nov 25, 2026
Merged

davidmckayv merged 4 commits into
mainfrom
fix/move-choose-organization

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

A person who belongs to more than one organization on OpenBot Cloud had everything from OpenBot (Self-Contained) moved into their own organization. The move never asked, and nothing let them move their Bots into their company's organization afterwards. This is the screens and Desktop half, on the client generated in #2132.

OpenBot Desktop: choose where the Bots go

  • After signing in to OpenBot Cloud, a person in more than one organization is asked where their Bots go, on a screen built from the move's own choice tiles. Their own organization comes first and is picked to begin with. Someone in one organization isn't asked.
  • The list is the organization list the move already reads, with the server's canMoveIn. An organization that doesn't let them use Bots is shown but can't be picked, with a sentence saying why. If a move would go there anyway, it is refused before anything is packed up, and nothing is removed.
  • A 403 MOVE_NOT_ALLOWED from OpenBot Cloud shows its own sentence.
  • The result screen names the organization chosen.

Web: move what's already moved

  • The bar names the organization that holds the person's newest finished move whenever that isn't the one they work in. Before, it went quiet as soon as the current organization had any move, so after a move between organizations the one the Bots left never pointed to where they went.
  • Next to "Switch to {org}", "Move them to {org}" moves them into the organization the person works in (createImport with fromOrganizationId, applyImport, read until imported, verification must match). It says it is moving; a stop shows the server's sentence and Try again; once moved everything is read again and the bar goes. Where the organization doesn't let them use Bots, a sentence says so in its place.

Tests, each failing on main and passing here:

  • Rust (cargo test --lib move_to_cloud, 26 pass): a person in two organizations moves into the one they chose; one organization, no question; an organization that won't take them is refused before anything moves; a 403 says its sentence and removes nothing.
  • Desktop window (bun test src/MoveToCloud.test.tsx, 22 pass; 3 fail on main): the choice with two organizations, none with one, the organization that can't be picked.
  • Web bar in real Chromium and WebKit (app/tests/moved-elsewhere.test.tsx, 30 pass; 18 fail on main): Move them to, a move that stops and Try again, the not-allowed sentence, the newest-move rule.
  • Setup window layout in Chromium and WebKit at three sizes, light and dark.

Merges after the server half is deployed in the same release.

@davidmckayv
davidmckayv force-pushed the fix/move-choose-organization branch 10 times, most recently from 791e1e0 to 8bf0805 Compare November 25, 2026 00:40
…at won't take them

A person on OpenBot Cloud belongs to their own organization and to their company's. The move from
OpenBot (Self-Contained) always put everything in their own and never asked.

Once they sign in, the move window reads their organizations (move_destinations). In one, the move
goes straight on into it. In more than one, it asks where their Bots go, with the choice screen's own
rows: their own first and picked to begin with, then the others. An organization whose canMoveIn is
false is shown, held, saying an admin hasn't let them use Bots there. The move goes into the one they
chose (move_to_cloud's new organization), which must be in their list, and the result names it.

An organization that won't take their Bots is refused before anything here is packed up or an import
is made there (move-not-allowed), with a sentence that names it. A 403 from createImport is OpenBot
Cloud's own sentence (MOVE_NOT_ALLOWED), not a line about the internet connection. Nothing is
removed in either case.

Api::open_in opens Cloud in the organization chosen from the list it reads. A window that sends no
organization moves into the person's only one, or their own, as before.
…to where they went

The bar that says a person's moved Bots are in another of their organizations offered only "Switch
to". Nothing let them bring the Bots across, and it went quiet as soon as the current organization
had any finished move, so after a move between organizations the one the Bots left never pointed to
where they went.

The bar now names the organization that holds the person's newest finished move whenever that isn't
the one they work in, reading every one of their organizations' moves on a hosted OpenBot.

Beside Switch, "Move them to {organization}" runs createImport here with fromOrganizationId, then
applyImport, reads the import until it is imported or failed, and requires getImportVerification to
match. Every write carries its own Idempotency-Key. While it runs it says it is moving; a failure
shows the server's sentence and Try again, which goes on with the same import. Once moved every query
is read again and the bar goes by its own rule. Where the organization's canMoveIn is false, a
sentence says they can't move Bots here and to ask an admin.
… allowlist

The move's Rust tests now open OpenBot Cloud in the organization a person chose (org_acme), and build an organization's address from the one Cloud named. The allowlist entry for those tests named only default and org_mine.
Main now holds every failure the app says in its own words to failureSaid, so a brief outage that says when to come back is drawn calmly. The moved-elsewhere bar drew a stopped move's sentence directly.
@davidmckayv
davidmckayv force-pushed the fix/move-choose-organization branch from 8bf0805 to e03ee3c Compare November 25, 2026 01:17
@davidmckayv
davidmckayv merged commit 9a895cb into main Nov 25, 2026
39 checks passed
@davidmckayv
davidmckayv deleted the fix/move-choose-organization branch November 25, 2026 01:47
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