Skip to content

fix(desktop): accept common computer calls and let input reach attached sheets - #9093

Merged
waleedlatif1 merged 4 commits into
stagingfrom
feat/computer-use-schema-2
Oct 16, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
feat/computer-use-schema-2

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

This follows #9084 and comes from two benchmark findings (MacAgentBench, Opus 5.5 through the worker loop).

Calls rejected before reaching the app. About one call per task was rejected as invalid input. This mirrors simstudioai/mothership#704, which should merge first so contracts:sync stays in step:

  • Coordinate clicks, scrolls and drags without windowId target the window the snapshot selected.
  • Scroll deltas default to 0, so a one-axis scroll is valid.
  • press_key with an elementId focuses that element first.

Input refused in system panels. #9084's stricter window checks refused input in two common panels:

  • Finder's Go to Folder: the app reports the sheet as its focused window, not the observed one.
  • Out-of-process open and save panels (Notes > Attach File): their contents report no window at all.

A sheet now counts as the window it is attached to. A click on windowless panel content is allowed only inside the app's focused sheet, and only when that sheet belongs to the observed window. Every other unconfirmed target is still refused.

Test plan

  • macOS 26 VM: Finder Cmd+Shift+G, then type a path and press Enter, navigates to the folder; Notes Edit > Attach File, then a click inside the panel and Escape both reach it
  • Helper compiles for arm64 with the macOS 26 SDK
  • 84-task benchmark against the merged fix(desktop): make computer use act on the app the user sees #9084 build (running)
  • CI

…lls and targeted keys

Mirrors the worker contract. Coordinate clicks, scrolls and drags without a windowId
target the window the snapshot selected; scroll deltas default to 0; press_key with an
elementId focuses that element first. Each shape was rejected before reaching the app
in benchmark runs (about one call per task).
Go to Folder and out-of-process open and save panels are sheets: the app reports
them as its focused window, and a panel's contents report no window at all. Input
checks now treat a sheet as the window it is attached to, and a click on windowless
panel content is allowed only inside the app's focused sheet.
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 15, 2026 11:22pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/desktop/native/computer-use/ComputerUse.swift
Comment thread apps/desktop/native/computer-use/ComputerUse.swift
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

The PR accepts common computer calls and lets input reach sheets attached to an observed window.

  • Coordinate actions use the selected window when callers leave it out.
  • press_key can focus an observed element before sending a key.
  • Input can reach sheets attached to an observed window.

Reviews (3) · Last reviewed commit: "fix(desktop): observe the focused window..." · Reviewed by Greptile

Comment thread apps/desktop/native/computer-use/ComputerUse.swift
Comment thread apps/desktop/native/computer-use/ComputerUse.swift Outdated
Comment thread packages/desktop-bridge/src/computer-use.generated.ts
…m targeted focus

- Coordinate clicks and scrolls without a windowId use the snapshot's selected
  window through every input check; element targets keep their own window
- press_key with an elementId sends the key only once that element holds focus
- The service observes the selected window after a call without one
- A scroll needs at least one delta, matching the worker contract
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/desktop/src/main/computer-use/service.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit debdd0e into staging Oct 16, 2026
101 of 103 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/computer-use-schema-2 branch October 16, 2026 00:05

This branch was previously deployed

1 inactive deployment
Preview — d6eebb04 Deployed Oct 15, 2026 by vercel[bot]
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