Skip to content

fix(computer-use): tighten batch and click-to-focus edge cases from the staging audit - #10012

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/computer-use-batch-audit
Nov 13, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
fix/computer-use-batch-audit

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-ups from a deep audit of the computer-use changes on staging (#9994, #9995, #9997, #10004):

  • Batch: every step is validated before step 1 runs (key names, required element/text/value/action, button and clickCount), so a typo never leaves a half-applied batch; a refused first step is reported as "Batch step 1 failed: …" so it is not mistaken for an unsupported batch; the first-step check is completed == 0 && !inputDispatched; cancellation is checked before every later step; dropped dead parameter copying
  • Batch observation: a batch now observes the one window all of its steps target (any untargeted step keeps the focused-window default), like single element/coordinate actions
  • Click-to-focus: waits up to 250 ms for an Accessibility focus request before clicking; a click refused by the mouse guards sends nothing and falls through to the focus check; after a click the caret moves to the end so typing inserts there; activation_required no longer claims nothing was dispatched after a click
  • Accessibility reads: the per-attribute fallback runs only when an element cannot answer a batched read (unsupported / illegal / not implemented), not on timeouts, so a hung app is not asked once per attribute
  • Projection: a wrapper cycle can no longer make a node its own parent; legend describes label/value/placeholder and omitted parents accurately
  • Contract synced from mothership (activateFirst wording); README describes the structure check's limits and the new coverage; removed a dead test parameter
  • Companion: simstudioai/mothership#960

Type of Change

  • Bug fix

Testing

  • Native checks on macOS 26 (PASS), including new batch pre-validation cases
  • Live fixture: new case — a click-only editor that already has text inserts at the end (live run pending a free VM; will confirm before merge)
  • desktop computer-use + IPC (101), projection (15), mothership-chat suites; new tests (batch window, wrapper cycle) fail on the previous code

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)

…he staging audit

Validate every batch step before the first runs and name a refused first step;
observe the window a batch targets; wait 250 ms for Accessibility focus before
clicking, treat a refused click as no click and put the caret at the end; never
report nothing-dispatched after a click; skip per-attribute fallback reads on a
hung app; guard a self-parent in the projection; fix legend and README wording.
Syncs the contract's activateFirst wording.
@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 9:47pm UTC

Request Review

@github-actions github-actions Bot added the requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep label Nov 13, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Cross-repo companion check

One or more companion PRs aren't merged into staging yet. Merging this without them will leave copilot and sim out of sync — merge them in lockstep.

  • ❌ simstudioai/mothership#960 — OPEN, not merged (targets staging) — fix(computer-use): say activateFirst runs before the sequence and narrow the bat

@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, with no actionable issues found.

Summary

Tightens batch checks, follow-up observations, click-to-focus behavior, and the tree shown to the model.

  • Batches reject malformed steps before any app action runs.
  • Text entry waits for focus, then clicks editors and starts at the end.
  • Batch results show the window the steps targeted.
  • Accessibility reads avoid repeating requests after timeouts.
  • The model's app tree no longer shows a node as its own parent.
  • Computer Use test setup and generated wording are cleaned up.

Reviews (3) · Last reviewed commit: "fix(computer-use): send no text when the..." · 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 10 files

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

Turn on auto-fix | Re-trigger cubic

… and scroll targets up front, and keep the escaped-newline row cost
@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 10 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 10 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 — b3da6648 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

requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant