Repository navigation
feat(computer-use): improve cua_repl AX, capture concurrency, element clicks, and progressive docs - #7505
Conversation
…hecks, and doc topics
jackwener
left a comment
There was a problem hiding this comment.
I reviewed 2f0bcf0e4a21a8a3b3e3b0abf97097490fc4058f. It merges cleanly with b7fb5b5d, and the required test check passed. The follow-up gives a capture its full execution timeout after it acquires the gate and restores the existing target and enabled-state checks before an indexed click.
Local checks passed for observation-before-documentation ordering, topic deduplication and retry, topic parity across all 12 locales, and JavaScript sleep input validation. I did not rerun the live macOS capture and input scenarios. The final dependency pin is 35762a79, which includes the capture timeout fix.
Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.
… clicks, and progressive docs (apache#7505) * build(computer-use): bump cua rev to 018e70b3 * fix(computer-use): skip ScreenCaptureKit on macOS AX-only observe * refactor(computer-use): unify macOS element clicks onto PendingClick * fix(computer-use): skip AXValue read-back on AXSecureTextField * feat(computer-use,js-runtime): add budget-checked cua.sleep(ms) * feat(computer-use): emit progressive topic docs after observations * fix(computer-use): address review findings on capture gate, element checks, and doc topics * chore(computer-use): polish i18n catalog topic index, doc links, and cua test margins
A Read page that stops at a line end omits that newline and the next page starts on the following line (facts/src/read/page.rs make_page: next at stop.utf16 + 1). The browser stack fixture glued pages with push_str, so after fd7f3ed (#7505) emitted trimmed doc topics before the report, a page boundary landed on the report line and it was read as "...best effort.{\"marker\":...}", failing check_report with 0 reports. Restore the newline when the next page's offset says one was skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: Claude Code (Claude Opus 5.5)
…ations (#7531) Carry forward the CI repairs on Jack's branch and clean up follow-up regressions:\n\n- Fix the missing ACP ModelChoice.provider_id test fixture and format markdown-toc.test.mjs with Biome.\n- Update stale test expectations for NSH drag-lift selection events, desktop Google Gemini -> Antigravity connection flow, folded Bot turn layout settlement, archived Read page newlines, iOS Room recovery New Chat locator, and Agent replay/stack sizing.\n- Retain plaintext reasoning normalization policy on reused Responses wire prefixes via a shared wire::install helper.\n- Restore light-theme iOS pressed glass action contrast (#D9E8F2, 4.57:1) and narrow HostListNotices offline state from a single snapshot.\n- Keep macOS popup autofocus pending until first-frame show and resolve AppKit field editor ownership in keymap::editing.\n- Isolate Markdown TOC native list scroll state per turn inside TocHeadingList (covering docked, compact-pinned, and section lists) and drop the obsolete syncedTurn reuse branch.\n- Decode saved eval batch CellRecord outcomes via serde_json::Value so arbitrary_precision feature unification preserves numeric fields inside tagged enums.\n- Restore the resident-pressure model.has_wire_prefix() assertion in Agent driver wire prefix reuse tests.\n\nRefs #7443, #7488, #7395, #7499, #7503, #7504, #7505, #7456, #7515.\n\nCo-authored-by: jackwener <jakevingoo@gmail.com>\nCo-authored-by: M4n5ter <m4n5terrr@gmail.com>\nGenerated-by: Claude Code (Claude Opus 5.5)\nGenerated-by: Maka (OpenAI)\nGenerated-by: OpenAI Codex\nGenerated-by: Maka (Gemini 4 Neon)
Summary
Improves
cua_replAgent Experience (AX) across macOS capture contention, AX-only observation overhead, unified indexed element clicking, secure-field input, timeout-safe sleeping, and progressive documentation delivery.Changes
Upstream
maka-agent/cua:maka(018e70b3) & dependency bumpNativeCaptureGateinplatform-macosfrom fail-fasttry_acquire()to a deadline-boundedMutex + Condvargate so healthy concurrent ScreenCaptureKit callers (e.g. Computer Stage preview +cua_replfrozen capture) wait cleanly instead of failing withScreenCaptureKit capture already in flightor degrading preview intoscreencapture -lsubprocesses. Stalled workers still fail fast and wake waiting callers vianotify_all().maka-agent/cuarev pins to018e70b3and regenerated reviewed third-party notices.Skip ScreenCaptureKit &
ScreenRecordinggrant on macOS AX-only observationsSession::observenow setscapture_image = screenshotand skipstcc::require(Grant::ScreenRecording)andDriver::capture_prepared_windowwhenkind == ObservationKind::Ax, while retainingprepare_page_frameforscroll(index)/moveCursor.system_permission::requiredsoGetAppandObserve { App, kind: Ax }require onlyAccessibility.Unify macOS
app.click(index)ontoPendingClickSlot::element_click_targetandrun_element_clickinmacos/controller.rsfor bothWindowandApplicationslots and routed high-levelAction::Click { target: Position::Element(_) }throughPendingClick, deleting the duplicateaction_innerclick branch.AXShowMenufor single right-clicks when available, falling back to simulated events for controls withoutAXShowMenuand multi-clicks; removed the silent coercion ofMouseButton::MiddletoMouseButton::Leftso middle-clicks dispatch viaNativeClickButton::Other.Skip
AXValueread-back verification onAXSecureTextFieldmacos.rsSetValuewith upstreamset_value.rs: whenset_string_attrsucceeds onAXSecureTextField, accept without plaintext read-back comparison.Add budget-checked
cua.sleep(ms)op_maka_sleepop to the REPL bootstrap without acquiring Host device locks or suspending timeout.CellTimeoutBudget::remaining_budget()and pre-checked sleep durations inop_maka_sleepso an over-budget wait rejects with a catchable JS error instead of terminating the REPL and wiping bindings.Progressive topic documentation emitted after observations (all 12 locales)
platform/computer-use/locales/docs/api.*.mdmarkers to<!-- doc: name [aliases...] -->…<!-- /doc -->(rescuing the previously unreachable### File choosers and uploadssection into thefilestopic) and removedCommand::Documentationin favor ofCommand::ReadDocumentation { name }with an auto-generated topic index appended tocore.facade.jsto emit observation values before deduplicated surface-scoped topics (core~3.2 KB en / ~1.5 KB zh-CN, plusdesktoporbrowseronce per REPL epoch), cutting first-call doc output by ~75–90% and preventing observations from being pushed intoarchive:.Verification
maka-agent/cua:maka(018e70b3):cargo test -p platform-macos --lib capture::tests(25/25) &capture::frozen::tests(3/3)cargo test -p maka-computer-use --features native-desktop --lib(165/165)cargo test -p maka-computer-use --features native-desktop --test integration(2/2, including observation-before-docs ordering assertion)cargo test -p maka-js-runtime --test integration repl::(13/13, includingrepl_sleep_checks_remaining_budget_without_terminating_the_repl)cargo test -p maka-computer-native --lib(5/5) &cargo test -p maka-i18n-build(3/3)cargo check -p maka-cli,cargo fmt --check,npx biome check,node scripts/i18n/check.mjs,node --test scripts/i18n/check.test.mjs,node scripts/rust/notices.mjs check-reviewed,node scripts/asf-license-headers.mjs check