Skip to content

fix(computer-use): type after a focus click only once the caret is confirmed at the end - #10019

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/computer-use-caret-confirm
Nov 14, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/computer-use-caret-confirm

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Release v0.9.57: cua improvements, Monaco CRM integration, Hex and Stripe validation, keyless subjects held until trust policies apply, AWS Marketplace replica entitlement check, Slack channel search #10017 review: the click-to-focus fallback (for editors that ignore an Accessibility focus request) typed at the click point when the editor exposed no settable selection range or no string value — the caret move was skipped and typing went ahead, possibly into the middle of existing text. It also returned silently if focus settled only after its poll, leaving the caret unchecked
  • Typing now proceeds only once the caret is confirmed at the end: the editor's length comes from its string value or AXNumberOfCharacters; an empty editor or a caret already at the end qualifies; a move counts only when the selection range reads back at the end; anything else (unknown length, unsettable range, failed read-back, focus not settled) refuses with caret_unconfirmed before any keystroke
  • An input_sequence whose first step is Cmd+A skips the check, since it replaces the value regardless of the caret
  • README describes the rule

Type of Change

  • Bug fix

Testing

  • Swift typecheck; live fixture adds a Cmd+A + text sequence into the click-only editor (replaces its value) alongside the existing insert-at-end and background-refusal cases — live run on macOS 26 queued for a free VM before merge
  • 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)

…nfirmed at the end

The click-to-focus fallback typed at the click point when the editor exposed no
settable selection range or no string value, or when focus settled only after its
poll. It now reads the editor's length (value or AXNumberOfCharacters), accepts an
empty editor or a caret already at the end, verifies a caret move by reading the
range back, and otherwise refuses with caret_unconfirmed before any keystroke. An
input_sequence that starts with Cmd+A skips the check, since it replaces the value.
@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 10:47pm 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.

No issues found across 3 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

@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 based on the reviewed changes.

Summary

The PR requires a confirmed end-of-text caret before typing after a focus click. A sequence starting with Cmd+A skips that check.

  • Click-to-focus typing waits until the caret is confirmed at the end.

Reviews (2) · Last reviewed commit: "test(computer-use): cover the caret_unco..." · Reviewed by Greptile

@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

This branch was previously deployed

1 inactive deployment
Preview — aca69b84 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