Skip to content

Computer: say a shared private Bot's computer is private, not starting - #2875

Open
davidmckayv wants to merge 3 commits into
mainfrom
fix/computer-refused-state
Open

davidmckayv wants to merge 3 commits into
mainfrom
fix/computer-refused-state

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

A teammate a private Bot is shared with opened its Computer and saw "Starting Fernhill Guide's computer… The first start takes about a minute" for ever, "Checking who has control…" for ever, "Couldn't load the Bot's browser" in the full-size view, and the terminal on "Reconnecting…".

OpenBot refuses them by design. Only an admin, anybody on a public Bot, and the Bot's owner may see a Bot's computer. That rule is unchanged here. Every computer call, and the live screen and terminal sockets, answer anybody else 404 BOT_NOT_FOUND, and the app read each of those as a computer on its way up or a dropped connection.

  • API (additive). Bot.computerAccess, allowed or refused, an optional read-only x-extensible-enum on every Bot read. Old apps ignore it, and an unknown value reads as allowed. Clients regenerated. No existing field could say this: canManage and mine are other verdicts, and the spec tells clients never to recompute the server's.
  • Computer panel. When the Bot read says refused, the panel shows one empty state (the existing PageEmpty, as "No computers for Bots" does) and mounts nothing else, so there's no screenshot, status, wheel or activity read and no socket:

    This Bot's computer is private
    Only the Bot's owner and admins can see it. You can still give the Bot work in a conversation.

  • Older servers (field missing). These still end honestly:
    • A refused screenshot or status read is the refusal, not "starting", and it isn't asked again.
    • A refused wheel read (refused on the control store) swaps the panel to the same empty state, closing the screen and terminal.
    • A card of the Bot's screen in a conversation says "Only the Bot's owner and admins can see its computer." in its frame.
    • The terminal's socket transport (connectScreen) now checks over HTTP when a socket closes before it ever opened, because a browser can't tell a refused upgrade from a dropped connection. A 404 BOT_NOT_FOUND ends the retries. Anything else retries as before.

Red/green

app/tests/computer-refused.test.tsx covers the panel, the screen and the terminal's connection, drawn for real with the generated client against a server stand-in. The stand-in answers the owner, an admin and a teammate as the server does. A refused socket behaves as a browser reports one: an error and a close, never an open.

  • Red on origin/main: 4 of 7 fail. The teammate's panel renders the Screen/Terminal tabs with "Starting Fernhill Guide's computer", "The first start takes about a minute." and "Checking who has control…". The refused terminal socket is retried as a drop.
  • Green on this branch: 7 of 7 pass. The owner and admin tests and the plain network-drop test pass on both, so those paths are unchanged.

Also run: no-bot-computers, computer-control-bot-gone, src/lib/computers, tests/computer* (215 pass). Plus api:generate (no drift), api:lint, oasdiff breaking (none), typecheck and biome.

End to end (Chrome and Safari)

These ran on a team-edition stack in Chromium and WebKit, with real sign-ins and real Bot computers. Marcus, a member, owns a private Bot, Release Helper, and publishes it to everyone. He opens its Computer, then Priya (admin) does, then Lena (a teammate) does. Each was run three ways:

  • Before: app at main, 44df75f. Fails in both browsers on the teammate step.
  • After: this branch. Passes in both.
  • This branch against a server without computerAccess: passes in both. The 404 path ends on the same empty state.

In the after run the teammate's page opened no socket to the Bot's screen or terminal, and made no screenshot, status or activity read.

Teammate, before: the screen says "Starting Release Helper's computer… The first start takes about a minute" and "Checking who has control…". The Terminal tab sits on "Reconnecting…".

Chrome, Screen Chrome, Terminal
Before, Chrome: Starting Release Helper's computer, Checking who has control Before, Chrome: the terminal on Reconnecting, Checking who has control

Teammate, after: one empty state, with no tabs, no spinner and no Activity.

Chrome Safari (WebKit)
After, Chrome: This Bot's computer is private After, Safari: This Bot's computer is private
Safari, before Safari, server without the field
Before, Safari: Starting Release Helper's computer Server without computerAccess, Safari: the same empty state
Chrome, dark Chrome, 390 px
After, dark: This Bot's computer is private After, 390 px: the empty state in the Computer sheet

Owner and admin are unchanged. Before and after are the same: Screen and Terminal tabs, the screen, "Release Helper has control" with Take control, and Activity.

Owner, Chrome, before Owner, Chrome, after
Owner before: the Bot's screen with Take control Owner after: the same
Admin, Safari, before Admin, Safari, after
Admin before: the Bot's screen with Take control Admin after: the same

Changelog

API.

  • Bot.computerAccess (allowed or refused, read-only, open enum) says whether the caller may see the Bot's computer. Additive. Older apps ignore it.

Fixed.

  • A teammate on a shared private Bot now sees "This Bot's computer is private" in its Computer, not a computer that never finishes starting, "Checking who has control…" and a terminal that keeps reconnecting.

@davidmckayv
davidmckayv marked this pull request as ready for review December 3, 2026 17:16
A teammate a private Bot is shared with opened its Computer and saw
"Starting the Bot's computer" for ever, "Checking who has control" for
ever and a terminal on "Reconnecting". OpenBot refuses them the computer
by design: only an admin, anybody on a public Bot, and the Bot's owner
see it, and every computer call and socket answers anybody else 404
BOT_NOT_FOUND.

The Bot read now says so up front (Bot.computerAccess, allowed or
refused, optional and additive), and the panel then shows one empty
state and opens nothing: no screenshot, status, wheel or activity read,
and no socket.

A server older than the field still ends honestly. A refused screenshot,
status read or wheel read is the refusal, not a computer starting, and
nothing is asked again. A terminal socket that closes before it ever
opened is checked over HTTP before it is retried, and a refusal ends the
retries.
@davidmckayv
davidmckayv force-pushed the fix/computer-refused-state branch from b743ba1 to 4381f22 Compare December 3, 2026 17:39

This branch has not been deployed

No deployments
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