Repository navigation
feat(computers): press and release the pointer so a person can drag - #493
Merged
Merged
Conversation
Contributor
|
🎉 This PR is included in version 0.64.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
A mouse press over a taken-over screen sent one
click, a press and release in one, so nothing could be dragged. The app now sendsmouse_downwhen a button goes down andmouse_upwhen it comes back up. With the pointer movement already sent in between, that drags: moving a window, selecting text, a slider.It needs a computer whose CLI has inference-gateway/cli#1795. An older one keeps working through a fallback.
Changes
frontend/components/ComputersView.tsx- the driven screen sendsmouse_downonmousedownandmouse_upon the matchingmouseup. The release is listened for on the window, so letting go outside the picture still releases.frontend/lib/screen-input.ts-ScreenInputgains themouse_downandmouse_upkinds, andisUnsupportedInputrecognises a computer that refuses an input kind.frontend/lib/screen-input.test.ts- a test forisUnsupportedInput.Fallback for an older CLI
A computer on a CLI without cli#1795 answers
unsupported screen input "mouse_down". The app then sends aclickfor that press and uses clicks for the rest of the take-over, with nomouse_up. Without this, every click on the current0.252.0computer image would fail and hand the screen back.Notes
take-overe2e test passes but does not press on the screen.Affected repos:
desktoponly. Docs follow-up: inference-gateway/docs#1175.