Skip to content

desktop: screenshot geometry and bounded wait for screen changes #152

Closed

Description

@ElbertePlinio

Desktop screenshots are the framebuffer at Xvfb size with no scaling, and click coordinates are the same pixels, but nothing in the tool result states that. Agents that downscale the inline image cannot map coordinates back. There is also no way to wait for the screen to settle or change after an action: window waits match titles only (waitForWindow, 10 s default), and MCP desktop_launch cannot set the wait timeout.

  • Screenshot results (MCP and CLI JSON) report display size, image size, scale 1 and that input coordinates are image pixels; record the same on the run manifest device
  • desktop_wait / desktop wait: bounded wait (default and maximum timeouts) until the screen hash differs from a given screenshot, or is stable for N ms, or a window with a name appears; returns the reason it stopped and records an action with status ok or timeout
  • windowTimeoutMs on desktop_launch with the same bounds as desktop_exec
  • Unit tests with fake captures and one live Xvfb test
  • Separate final reviewer

Part of #118. Refs #22, #117.

Activity

  1. ElbertePlinio commented on Sep 15, 2026

    @ElbertePlinio
    MemberAuthor

    Implementation started after #151 merged. Scope is truthful screenshot display/image geometry and image-pixel coordinates, consistent evidence device metadata, bounded change/stability/window waits, and bounded desktop_launch windowTimeoutMs. Live tests must distinguish real pixel changes from PNG timestamp/metadata changes and exercise unchanged-screen stability. Existing private session storage, CLI/MCP path boundaries, interaction/outcome rules and browser/Android behavior remain intact. Independent review and required PR CI precede merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions