Repository navigation
Description
Problem & intent
A left coordinate click into a background Chrome page never reaches the page, and cua reports success. The same holds for a synthesized element click, focusField's fallback and a drag.
Live, 2026-11-05. The isolating slot ran on main 1c4b7e6's build 375d42a25333, with records in docs/evidence/2026-10-30-macos-agent-cursor/item-187-isolate/. Chrome for Testing was behind TextEdit, and the counters page logs document-level capture mousedown and click. It recorded mousedown 0, click 0 for 4 of 4 route 3 coordinate clicks posted at the textarea's centre:
- C2 repetition 1 (
item-187-iso-raise-0.jsonl): ⌘L, then the click, withactivationJoin rearmed; - C4 (b), all 3 (
item-187-iso-menu.jsonl): a menu record, then the click, with joinfresh.
Each time the window became key (the page's window and textarea focus counts rose), and the result's delivery read clean with 0 restores.
The in-frame paths delivered: C3's popup close button (activationPoint early, join shared) closed its popup 3 of 3, and #188 cell 3 (ii) on Electron moved the caret.
The cause, confirmed statically:
- Chrome's AXActivationPoint lies outside its frame, so route 3's activation posts no click at the point. For a left pointer holder (
postsLeftMouseDown,defersArmClick) it also posts no early inert click (Activation.swift:575–600). - The pointer's own down is then the first mouse event after subtype 1 (
postAction, Activation.swift:633–647, recordedactivationClickKind {action, consumedByAction}). - AppKit's
sendEvent:mouse-down path (25G83,~/.local/share/187/appkit/d-md.txt) takes branch 1 under_mouseActivationInProgress. It makes the window key and main with no ordering (+2180 to +2196), then asksview:acceptsFirstMouseEvent:initialKeyWindow:(+2792). On NO it clears_lastLeftHit(+2960), and no view getsmouseDown:or the up. - Chromium's
RenderWidgetHostViewCocoa acceptsFirstMouse:answers YES only for windows above normal level (content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm:922–938), so a page refuses first mouse.- Chromium 212c026a (2026-10-09) adds a YES for another process's clicks, but only when
!NSApp.active. The pinned Chrome for Testing 155.0.8059.84 predates it. - Even with it, subtype 1 sets the app active, so route 3 would still be refused.
BridgedContentView acceptsFirstMouse:answers YES, so Chrome's own native controls do receive the click.
- Chromium 212c026a (2026-10-09) adds a YES for another process's clicks, but only when
History.
- The sit2 spike (f3b2ae8, 2026-10-19) posted the activation click at AXActivationPoint wherever it lay. Route 3's clicks then met a key window and toggled the background page's checkbox 3 of 3 (docs/doperpowers/research/2026-10-18-own-native-engine/spike/sit2/u12u13/cua/run-1/results.jsonl:124–128, 142–146).
- 5941e98 (Own macOS native engine (#117): M0, M1a, M1b — cua Engine.app behind CUA_NATIVE_ENGINE (default unchanged) #176, 2026-10-20) made route 3 skip an activation point outside the frame, so Chrome's pointer down became the arm-consuming down. This is the earliest affected build. M2a, Own engine brings the driven app to the front in MAWS sessions (MacBook opt-in build) #200 and Engine: an activation never leaves an arm (inert click), the multi-line paste settles each Return, and item 187's re-slot kit (refs #187, refs #188) #261 carried it on.
- Engine: an activation never leaves an arm (inert click), the multi-line paste settles each Return, and item 187's re-slot kit (refs #187, refs #188) #261 named it
defersArmClick/consumedByActionand addedrearmed, which sends a click after a ⌘ key or AXPress into the same path. Withoutrearmed, that click would have met a key window and been delivered, with Own engine brings the driven app to the front in MAWS sessions (MacBook opt-in build) #200's raise. - Cursor-sitting item 1's checkbox click was an element click by index (route 1, AXPress, no mouse event), so it doesn't contradict this.
The vendor. Its background click (route 2) posts the pair at AXActivationPoint wherever it lies (R/F-helper-logic.md:79–83, :416–424). On Chrome that is the sit2 sequence, which delivers at the cost of an ordering click (a raise). No recorded vendor row shows a page receiving a background coordinate click: the native matrix's vendor background-Chrome rows are all invalid (R/m2b/hold3/summary-as-recorded.md:210–221). sit2 measured cua's forced route 2 at 3 of 3 on Chrome. So against the vendor this is a regression in delivery, traded for #200's no-raise.
Affected. Any route 3 left pointer action whose down meets a set arm because the activation point wasn't clicked (outsideFrame, control, actionsUnknown, hitTestFailed, noPoint), into a view that refuses first mouse:
- the coordinate click (Input.swift:389);
- the synthesized element click (ElementInput.swift:227);
- focusField's fallback (ElementInput.swift:240–249), which joins set_value's hold and so takes
rearmed; - the drag (ScrollDrag.swift:160), which goes nowhere.
A double click loses its first press. Right and middle clicks are unaffected, since they post the early inert click.
The success report can't notice. deliver samples only the frontmost app and the window order.
Intent. A pointer action into a background app delivers its click, or the result says it didn't. The engine never answers success for a click the page didn't take.
Constraints
- Keep Fix Chrome background paste clipboard-read timeouts in composing@textedit rows #187's inert click for no-click holders and the rule that a hold never ends with its arm set. Keep Own engine brings the driven app to the front in MAWS sessions (MacBook opt-in build) #200's delivery guard and after-action watch.
- Any fix that brings back an ordering click must keep the delivery guard's repair inside the screen-update hold, and the cost must be measured, not assumed.
- The vendor runtime stays unmodified. Live proof runs on harness fixtures (Chrome for Testing), never the owner's Chrome.
- Spawned by Fix Chrome background paste clipboard-read timeouts in composing@textedit rows #187's isolating slot. Relates to macOS engine: a pointer click joining another connection's hold or a recorded menu span is an ordering click the guard repairs #279 and macOS engine: route 3's per-action activation fires a page focus event on every background click (vendor: once per session) #245. No parent (consciously N/A: a standalone engine bug). Nothing blocks it.
Success criteria
- Live, on background Chrome for Testing with page counters (add pointerdown and mouseup), compare the shipping build against the fix:
- a fresh coordinate click;
- a forced route 3 element click on the checkbox;
- ⌘L, then a click;
- set_value's focus fallback;
- a drag;
- on the shipping build only, a click on Chrome's own toolbar (the control: it should receive the click).
- The page receives each click exactly once, and the raise is repaired inside the hold or shown with numbers.
- A unit test that fails today: a left pointer holder into a window whose activation point is outside its frame posts an arm-consuming click before its own down, or the result reports the click as unconfirmed.
- An honest result where delivery can't be achieved: the route's
consumedByActionsignature (the down was the activating click) surfaces as an unconfirmed click, never as plain success.
Design (the design session's ruling, 1ea561bc 33e95829, 2026-11-05)
The rule it applies. The owner has already ruled this class: "On a shared desktop, cua refuses input an app ignores. A dedicated desktop may bring the window forward." That ruling is the Linux engine's device mode (docs/doperpowers/specs/2026-10-28-own-linux-engine-design.md, "Device mode and the foreground route"). Chrome's web content ignores a background first mouse, so the same split applies on macOS.
Which targets are affected. A left pointer action whose down would consume the activation arm: route 3, the activation point not clicked, and defersArmClick. Within that, the target counts as a Chromium web area when both of these hold:
- the target process is Chromium-shaped (
webShaped, Enablement.swift); - the AX hit element at the pointer's point is an AXWebArea, or lies inside one.
Chrome's own toolbar and other native views, whose BridgedContentView accepts first mouse, keep today's path.
Shared mode (the default):
- A left click, double click or drag into a Chromium web area is never posted as a pointer.
- If the hit element advertises an action (AXPress), the click goes by the element route: route 1, the accessibility action, no mouse event. Item 1 of Visible agent cursor on macOS (opt-in overlay in cua's own engine at the agent's target point) #235's sitting showed that route delivers on a background page.
- Anything else is refused with a stated sentence naming the cause and the remedy, in the Linux engine's form:
<App>'s web page does not accept a background click; bring <App> forward or use a dedicated desktop. That covers a click with no action, a double click, a drag, and focusField's fallback inside a web area. - Nothing is posted. That rules out double delivery, the reason detection with a retry was rejected on Linux.
Dedicated mode:
- The early inert click is posted for left pointers too (no
defersArmClick), so the down meets a key window and is delivered. - The window may come forward, and the delivery guard does not put the person's order back for that action, since nobody is at a dedicated desktop. This is the Linux foreground route's choice.
The mode:
- It is resolved as on Linux:
CUA_DESKTOP_MODE, else~/.config/cua/engine.json'sdesktop, elseshared. TodaydesktopModeForin src/runtime/launch.mjs resolves it for Linux only. It extends to macOS sessions on cua's engine. - The macOS engine is one process shared by many connections, so the mode reaches it per connection: a field of the connection's handshake (the service passes it), never a global setting.
- Doctor reports the mode for macOS too.
Everywhere, the honest result. Some actions still post a pointer whose own down consumes the arm (activationClickKind {action, consumedByAction}) into a target that is not known to accept first mouse. Today those are non-Chromium apps with an activation point that wasn't clicked (outsideFrame, control, actionsUnknown, hitTestFailed, noPoint). Such an action answers unconfirmed, with a sentence (clickUnconfirmed, like pasteUnconfirmed): the click was posted but may only have activated the window. It never answers plain success. Chromium's non-web views count as known to accept. This alone ends the silent loss.
rearmed stays only where it still pays: a shared-mode pointer into a view that accepts first mouse, such as Chrome's toolbar. Dedicated mode doesn't need it, and shared mode no longer posts pointers into web areas.
Rejected:
- A as stated (always post the early inert click): on a shared desktop it brings back Own engine brings the driven app to the front in MAWS sessions (MacBook opt-in build) #200's raise for every background Chrome click, against the owner's ruling. It is kept only as dedicated mode.
- B, post the down twice: double-delivers wherever a view accepts first mouse (a window above normal level, Chrome's toolbar), and leaves an extra press in an app's state.
- C, plan by acceptsFirstMouse for every app: AX exposes no acceptsFirstMouse. The web-area test above is the one narrow, checkable case that the evidence and Chromium's source support, and the honest result covers the rest.
- D, route 2′ on Chrome builds with 212c026a: sit2 measured 2′ failing on Chrome 155. AppKit's inactive-app path still orders the window (+2756) and changes the key window (+2768). And it depends on a Chrome version the harness doesn't pin. It may be revisited once Chrome for Testing carries the commit.
Acceptance
- Engine unit tests that fail on main:
- Shared mode with a Chromium web-area hit: no mouse event is posted. The click takes route 1 when the hit advertises AXPress, and otherwise is refused with the sentence. The same holds for the double click, the drag and focusField's fallback.
- Dedicated mode: the early inert click is posted before the pointer's down.
- Everywhere:
consumedByActioninto a target not known to accept first mouse answersclickUnconfirmed.
- Hosted Chrome for Testing A/B (no owner): Chrome for Testing in the background on a page with pointerdown, mousedown, mouseup and click counters.
- The control, main's build: the click is lost (0 events, success reported).
- Shared mode: the click is refused, or element-routed and delivered (an AXPress checkbox toggles once). The page never receives a pointer event it didn't take.
- Dedicated mode: delivered exactly once (1 pointerdown, 1 click).
- Chrome's toolbar keeps delivering in shared mode.
- Review: reviewer-high on the engine diff.
- Docs: the spec's Decision Log entry, and the first-call document's sentence for the refusal.
Sources
- The records:
docs/evidence/2026-10-30-macos-agent-cursor/item-187-isolate/(runs.md, item-187-isolate.md, item-187-iso-raise-0.jsonl, item-187-iso-menu.jsonl, item-187-iso-dialog-*.jsonl). PR Evidence: #187's isolating slot LANDS (the inert click alone restores delivery); #188's rows PASS on cua #281. - The static AppKit reading:
~/.local/share/187/appkit/d-md.txt(+1664, +2180–2196, +2772, +2792, +2960) andappkit-active-subtype1.md. - The code: native/engine/Sources/Engine/Activation.swift (
postActivation,postAction,consumeArm), MenuSpan.swift (acquire,rearms), Input.swift:176 and :389, ElementInput.swift:227 and :240–249, ScrollDrag.swift:160, Mouse.swift:157–177. - The spec: docs/doperpowers/specs/2026-10-18-own-native-engine-design.md (sit2 at :150 and :154; the Decision Log's Own engine brings the driven app to the front in MAWS sessions (MacBook opt-in build) #200, Fix Chrome background paste clipboard-read timeouts in composing@textedit rows #187 and 2026-11-05 hold-join entries).
Activity
SSFSKIM commentedon Nov 5, 2026
[board] in-progress: Design ruled by the design session (1ea561bc 33e95829): shared mode element-routes or refuses Chromium web-area pointers, dedicated mode posts the early inert click, clickUnconfirmed everywhere; written into the body.
Engine: a background pointer into a Chromium web area is element-rout…
The device mode reaches the macOS engine: the launch resolves it as o…
Docs: the first-call paragraph for #282's refusal and clickUnconfirme…
Engine: a Chromium hit is known to accept first mouse only when its w…
Engine: the coordinate hit-test asks the application element, kept on…
Engine: shared mode's web-area element route presses only an allowlis…
Engine: the web-area element route presses the hit's nearest allowlis…
31 remaining items
Engine: a shared-mode pointer into a background Firefox page is eleme…
Engine: an element-routed click's stalePoint record keeps the first c…
Engine: the stale-point guard refuses a click when the app opened a w…
macOS engine: AX text actions wait for a foreground click to land, an…
macOS engine: #452 refuses by where the app's hit-test answered, so c…
macOS engine: a click on the app's own window over the observed one i…
macOS engine: #458's review fixes: the closed <select> and the combo …
macOS engine: #458's re-review fixes: a decided <select> press takes …
Merge origin/main (#456, 0.28.25) into fix/458-popup-press: the versi…
macOS engine: a coordinate click on a closed pop-up button is deliver…
native matrix and engine service: hold 3's route A/B is removed, CUA_…
macOS engine: a click on a frontmost web text field places a caret, a…
macOS engine: refuse a shared pointer with no activation standing whi…
macOS engine: refuse a shared pointer while another app is in front o…
Chrome's background drag is a declared departure (#282, #591), listed…