Skip to content

feat(computers): press and release the pointer so a person can drag - #493

Merged
edenreich merged 1 commit into
mainfrom
feat/take-over-drag
Nov 10, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/take-over-drag

Conversation

@edenreich

@edenreich edenreich commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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 sends mouse_down when a button goes down and mouse_up when 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 sends mouse_down on mousedown and mouse_up on the matching mouseup. The release is listened for on the window, so letting go outside the picture still releases.
  • frontend/lib/screen-input.ts - ScreenInput gains the mouse_down and mouse_up kinds, and isUnsupportedInput recognises a computer that refuses an input kind.
  • frontend/lib/screen-input.test.ts - a test for isUnsupportedInput.

Fallback for an older CLI

A computer on a CLI without cli#1795 answers unsupported screen input "mouse_down". The app then sends a click for that press and uses clicks for the rest of the take-over, with no mouse_up. Without this, every click on the current 0.252.0 computer image would fail and hand the screen back.

Notes

  • Not tried on a real computer. No released CLI accepts press and release yet, so neither the drag nor the fallback has run end to end. The take-over e2e test passes but does not press on the screen.
  • Pointer movement is tracked over the picture only, so a drag stops at its edge.

Affected repos: desktop only. Docs follow-up: inference-gateway/docs#1175.

@edenreich
edenreich marked this pull request as ready for review November 10, 2026 00:29
@edenreich
edenreich merged commit d32b052 into main Nov 10, 2026
1 check passed
@edenreich
edenreich deleted the feat/take-over-drag branch November 10, 2026 00:30
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.64.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-maintainer inference-gateway-maintainer Bot added the released Shipped in a release label Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant