Repository navigation
Description
Problem & intent
PR #261 (#187) consumes route 3's activation arm (set by subtype 1 in an app that doesn't believe it is active) by one of two kinds of holder:
- A no-click holder (paste, ⌘ key equivalents, AXPress element actions, set_value, select_text, the secondary action, the menu record, a non-left click) posts an inert click right after subtype 1, so its keys meet a key window.
- A pointer holder (a left coordinate click, a synthesized element click, a drag, focusField's fallback) posts no early click. Its own left mouse down consumes the arm on AppKit's branch 1, which makes the window key and main with no ordering. That keeps Own engine brings the driven app to the front in MAWS sessions (MacBook opt-in build) #200's raise away from the most common background action, a click into Chrome.
The two kinds share one activation per process (HeldActivations.acquire, MenuSpan.swift). #261 handles the sequence within one connection: a pointer holder that joins a shared activation whose arm is consumed, while every holder belongs to its own connection, ends that activation (subtype 2) and takes a fresh one (subtype 1), so its own mouse down consumes a new arm. That is the fix for ⌘L or AXPress into a background Chrome followed by a click (the spec's Decision Log, 2026-11-05).
Two cases keep the old join. In both, the pointer's mouse down meets a key window of an app that believes it is active, and that click is an ordering click (isOrderingMouseDown): the target's window rises above the person's, and the target's process may come forward.
- Another connection's holder. A holder from another connection may be mid-action, so ending its activation under it is not safe.
- The interleave inside one activation: a no-click holder on another connection joins between the pointer holder's activation and its claim (
FakeActivation.postAction), finds the arm set and unclaimed, and posts the inert click. - The lingering hold: another connection's ⌘ or element hold already consumed the arm.
- It needs two connections driving one pid.
- The interleave inside one activation: a no-click holder on another connection joins between the pointer holder's activation and its claim (
- A recorded menu span. The connection's menu record holds the activation, and the model is about to click into the menu it opened. Deactivating could close that menu and break a click that works today, so the join stays and the click may order the window.
- An in-frame activation point. On TextEdit, Finder and Electron the activation posts its click at the window's own inert activation point, inside the frame, for every holder (unchanged since before 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). A pointer action joining such a hold, or running its own activation, finds the arm already spent by that click, so its mouse down also meets a key window. A fresh activation would post the same click again, so 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 doesn't swap there. Whether that down orders the window is unmeasured.
What it costs today. The delivery guard (#200, FakeActivation.deliver) answers it:
- In the hold: the person's window is raised back and their app made frontmost again, all inside the screen-update hold (
SLSDisableUpdate, capped at 100 ms,activationHoldCapMs). The guard samples every 10 ms untildeliveryGuardStableSamples(3) samples in a row find the order right. Within the cap, the raise doesn't show on screen. - Past the cap: the repair goes on inside the 1 s repair window as a visible flash (
repairedAfterRelease). Past that it ends with the raise left as is (capped,raiseLeft). - Records: each repair is recorded on the connection (
afterActionRepairs). - On the click and the target: the click still delivers, since the window is already key and there is no first-mouse swallow. The target app gets one more became-active/resigned-active pair when its process came forward and was sent back.
- Cost: the action pays the guard's extra samples (on the order of tens of ms) and the display hold, and the target's window may visibly flash on a slow repair.
Intent: a pointer action into a background app is never an ordering click, however the activations before it were shared, or the cost is measured and accepted with numbers.
Constraints
- Preserve 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's rule (a hold never ends with its arm set), the early inert click for no-click holders, the same-connection re-activation, and
activationClickKind. - Never end an activation another connection's holder may be acting under. Never close a recorded menu under the model's click.
- Preserve Own engine brings the driven app to the front in MAWS sessions (MacBook opt-in build) #200's delivery guard and after-action watch as the safety net. They are not the fix.
- The vendor runtime is unmodified. Live proof runs at an attended MacBook slot on harness fixtures, never the mini.
- Spawned by Fix Chrome background paste clipboard-read timeouts in composing@textedit rows #187; relates 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. Parent N/A; blocked-by N/A (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 merged first).
Success criteria
- Live, measure the cases with a raise watcher (the first two on Chrome for Testing behind TextEdit, the third on TextEdit behind another app: a ⌘ key equivalent, then a coordinate click), and report whether the click orders the window, the guard's repairs, its time, and whether anything showed on screen:
- two connections: one connection's ⌘ key equivalent, then another's coordinate click into the same window;
- a menu recorded open on Chrome, then a coordinate click into it.
- A ruling from those numbers. Either:
- accept the cost, with the numbers in the spec's Decision Log; or
- change the join. Options: the registry learns which holders are mid-action (a per-action in-flight count on the activation), so an idle other-connection hold can be re-activated like a same-connection one; or the menu span's click goes through the menu's own route.
- A test that fails today for each changed case.
Decision log
- 2026-11-01: the cross-connection case was accepted as a stated limit of 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 (the design session, on the review of 0d88830..c32bec9).
- 2026-11-05: the same-connection case, found while drafting this ticket, was fixed in 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 by re-activating for the pointer joiner (the design session's ruling). This ticket was narrowed to the two cases that keep the old join: another connection's holder, and a recorded menu span (kept, since deactivating can close the menu).
Sources
docs/doperpowers/specs/2026-10-18-own-native-engine-design.md, the Decision Log entries for Fix Chrome background paste clipboard-read timeouts in composing@textedit rows #187's inert click (item 2), the hold join (2026-11-05), and Own engine brings the driven app to the front in MAWS sessions (MacBook opt-in build) #200's (the delivery guard, the after-action watch).native/engine/Sources/Engine/MenuSpan.swift(HeldActivations.acquire),Activation.swift(postActivation,consumeArm,postAction,deliver,activationHoldCapMs,deliveryRepairWindowMs),FocusHold.swift.native/engine/Tests/EngineTests/ActivationClickTests.swift(the joiner-during-a-drag test and the hold-join tests).
Activity
Engine: an activation never leaves an arm (inert click), a pointer jo…
Kit: #187's hold-join rows, C2 keys-then-click, C3 the popup dialog, …
Plugin 0.22.1: activationJoin in the input meta, and #187's isolating…
The next #187 slot's kit: a control build without the inert click, th…
SSFSKIM commentedon Nov 5, 2026
Measured at the 2026-11-05 isolating slot (main 1c4b7e6's build 375d42a25333; records in
docs/evidence/2026-10-30-macos-agent-cursor/item-187-isolate/, PR #281). 3 repetitions each, no verdict:activationJoinwasfreshin all 3, so the span had ended before the click, asmenuSpanStepreturns.endBeforefor a coordinate click on one connection.activationPoint early, joinfresh), and the click joinedsharedin all 3.shared, and the click closed the popup in 3 of 3. That click reached the page.rearmedorfresh). It is being investigated as its own engine bug, and will be filed and linked here.Sminos-Session: cursor235#b93055dd (cua on macbook)