Repository navigation
fix(browser): a press an SSH host left held across commands is let go of when the host is revoked - #30847
Merged
Conversation
… of when the host is revoked
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
ELI5
An SSH host's
orca browser mouse downpresses a button on this desktop's page, and the matchingmouse upcomes later as a separate command. If the host disconnected in between, or the user turned off "Allow this host's orca CLI to control Orca", the page was left with the button stuck down. Now the desktop lets go of it when the host's connection ends.What Changed
Before: each host command tracked only what it pressed itself, and that tracking ended when the command finished. #30630 lets go of a revoked command's own presses, but nothing covered a press left behind by a command that had already finished. Later moves on that page, including the desktop's own, were sent as drags, because the page still had the button down.
After:
trackRemoteCliInput). That function now records, for each page, which host connection last pressed each button, key or touch. A release by anyone clears the record. A press by the desktop or by a different host also clears it, but only after that press is delivered.hostRevoked) is passed down through manager, wiring, executor, browser scope and queue. Unlike the per-command signal, it does not fire when orcad cancels one command or a command times out. When it fires, every press that host still owns is let go of off the page. The release runs in the page's command queue, rechecks ownership at that point, and falls back to a direct release if the queue was torn down.Cancelling one command still lets go of only what that command pressed, as before.
Why
Tying held input to the connection that pressed it, and clearing it when that connection ends, is the usual model for a remote input session.
The first version parked the leftover presses per command and handed them to the host's next command. Reviews found three problems with it:
A single ownership record kept at the one place all input flows through removes all three.
Known limit: real mouse and keyboard input from the user doesn't pass through that function. A user who physically holds the same button when the host disconnects gets a synthetic release off the page. Electron's input events also fire for injected input, so they can't tell the user's own input apart reliably.
Linked Issue
None. Found in a deficiency scan of the remote client surfaces.
Visual Proof
N/A: no UI change; this is input state on a page driven over SSH.
Testing
src/main/browser/agent-browser-bridge-host-revocation.test.ts:mouse up;desktop-browser-bridge-manager.test.ts: the host signal survives one command's cancel and fires on close.src/main/browser,src/main/runtime/desktop-browser-bridgeand the bridge wiring tests with one worker, the local static-analysis job andsmoke:orcad-terminal.Review
Agent skill upstream boundary
Notes
Checklist