Skip to content

the Computer pane switches a Bot to its own screen on a computer it shares, and back - #208

Merged
hexuria merged 1 commit into
mainfrom
gol/own-screen-app
Oct 10, 2026
Merged

hexuria merged 1 commit into
mainfrom
gol/own-screen-app

Conversation

@hexuria

@hexuria hexuria commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Client half of hexuria/opengrok-server#376. The server half is hexuria/opengrok-server#383 (merge that first); the box half is hexuria/box#40 (merged).

What

  • CoworkerComputer.screen (own | shared), from opengrok-server coworker_screen. None from a server before own screens, which hides the switch.
  • OpenGrokClient::set_own_screen: PUT /coworkers/{id}/computer/screen {own} → whether the Bot is on its own screen now (server put_own_screen). A refusal, such as for a Bot with a computer of its own, comes back in the server's words.
  • AppState::own_screen_offer / set_own_screen:
    • The switch is offered only when the computer is shared (shareScope user or org) and the server says which screen the Bot is on.
    • Flipping it calls the route, shows the answer at once, then reads the computer again.
    • An error goes to the Bot's notifications.
  • Computer pane: a monitor icon in the header row, next to route traffic (computer-own-screen).
    • Lit in the accent while the Bot is on its own screen.
    • The tooltip says what the Bot's screen is and what a click does.
    • Dimmed while the server answers.
  • gpui-agent: computer-own-screen is a switch node, checked while the Bot is on its own screen and disabled while it is switching. Clicking it sends SetOwnScreen(!own). The node is absent when nothing can be switched. Catalogued in src/agent/mod.rs.

The computer window already loads the server's vncUrl per Bot, so it shows the Bot's own screen without change: the server's screen proxy routes it to that Bot's display.

Tests

  • a_bot_is_put_on_its_own_screen_and_back (wiremock: one PUT each way; screen read, and absent from an older server).
  • the_own_screen_switch_is_offered_on_a_shared_computer_only (user and org → offered and checked as reported; dedicated, group and no screen → not offered).
  • cargo fmt --check is clean. Both tests passed locally (cargo test --all-features own_screen). The full suite and both clippy gates run in CI.

Live check to follow once #383 is merged and running on :1447: switch Bot B to its own screen, open Facebook in Bot A, and see that Bot B's screen does not show it.

@hexuria
hexuria merged commit 72efae5 into main Oct 10, 2026
5 checks passed
hexuria added a commit that referenced this pull request Oct 11, 2026
…computer is on its own screen (#210)

* the Computer pane drops the own-screen switch: every Bot on a shared computer is on its own screen

Reverts #208. The server now puts every Bot that shares a computer on a screen of its own, with
its own browser and profile, and has no route to switch it back (opengrok-server
gol/own-screen-default), so the switch would do nothing.

* the eye on a hovered screenshot sits in the middle of the picture
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