Skip to content

fix(computer-use): click an editor into focus when Accessibility cannot focus it - #10004

Merged
waleedlatif1 merged 6 commits into
stagingfrom
fix/computer-use-focus-by-click
Nov 13, 2026
Merged

waleedlatif1 merged 6 commits into
stagingfrom
fix/computer-use-focus-by-click

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • type_text / input_sequence refused in SwiftUI sheets that ignore an Accessibility focus request — e.g. Clock's "Add a clock" city search kept focus on the sheet's group, so typing a city failed with "The exact editor is no longer focused" (3 multi-app benchmark tasks hit it, one lost its city)
  • When the app is in front and the AX focus request did not take, the helper now clicks the editor's center the way a user would — only if that point hit-tests to the editor itself inside its observed window, through the existing coordinate-input guards (foreground app, unchanged window geometry, receiving app/window) — then runs the usual focus checks before any keystroke. Background apps and covered or mismatched points send nothing

Type of Change

  • Bug fix

Testing

  • Probe on macOS 26 (Clock → Add a clock → type "Pretoria"): staging helper refuses with the focus error and the field stays empty; this helper types it and the field reads "Pretoria"
  • Live fixture test with this helper: PASS (AX click/set/action, Unicode typing, chords, drag/scroll, refusals, date picker, window-target typing, batch scenarios)
  • Swift typecheck; full gate in CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…ot focus it

SwiftUI sheets such as Clock's city search ignore an Accessibility focus request, so
type_text refused with 'the exact editor is no longer focused'. In a foreground app
the helper now clicks the editor's center, only when that point hit-tests to the
editor inside its observed window, then applies the usual focus checks.
@vercel

vercel Bot commented Nov 13, 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 Nov 13, 2026 7:54pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Adds guarded click-to-focus for editors that ignore Accessibility focus requests.

  • Text entry clicks an editor when Accessibility cannot focus it.

Reviews (4) · Last reviewed commit: "fix(computer-use): never click a secure ..." · Reviewed by Greptile

@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 2 files

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

Turn on auto-fix | Re-trigger cubic

…e it, and cover click-to-focus in the live fixture
@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 Nov 13, 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.

All reported issues were addressed across 4 files

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

Turn on auto-fix | Re-trigger cubic

@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 Nov 13, 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.

All reported issues were addressed across 4 files

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

Turn on auto-fix | Re-trigger cubic

@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 Nov 13, 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 4 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 6cb5bfc into staging Nov 13, 2026
50 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/computer-use-focus-by-click branch November 13, 2026 21:02

This branch was previously deployed

1 inactive deployment
Preview — a739a8a2 Deployed Nov 13, 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