Description
Problem
In shared mode, route 3's activation guard sometimes fails on a click into Chrome while Chrome is behind the person's window. The action is refused, honestly, with activationFailed ("the app's window did not stay behind the frontmost window within 1 s"). But the target's window is left listed above the person's window. It stays there from about 1.03 s after the click to the end of a 3 s watch. Frontmost and key window don't change.
Ruling 1069 makes a background click that raises the target's window above the person's window a failure, even when focus doesn't move. Main has this on its own code path, so it's registered under 891 as a P2 (ruling 1069).
Evidence
Cell datalist/shared-behind/p-element: main's element click by ID on a Chrome datalist row (route 3), Chrome behind a TextEdit cover. 20 rows per head; kit probe/453-measure, README 0d52741, §"The shared-mode raise in datalist/shared-behind/p-element, pinned down".
| Head | activationFailed | raised at end | first raised |
|---|---|---|---|
| main 5580ac2, https://github.com/SSFSKIM/cua/actions/runs/45082409495 | 2/20 | 2/20 | 1038, 1022 ms |
| fix/453-axpress a8307c6, https://github.com/SSFSKIM/cua/actions/runs/45084310309 | 1/20 | 1/20 | 1054 ms |
- Every raised row is exactly an
activationFailedrow. - In every row the list was dismissed and no option taken, which is a separate effect of route 3 on transient UI.
- First seen in macOS engine: deliver a click on an app's overlay window (Chrome's omnibox popup) to that window instead of refusing it #453's counted qual (run 45075999203, row datalist-shared-behind-p-element-3).
Where to look
native/engine/Sources/Engine/Activation.swift, the route-3 guard. A 10 ms poll for up to 1 s answers the target's window ordering above the user's focused window with AXRaise on the user's window. When the poll times out, the action is refused, but nothing restores the window order on that failure path.
Acceptance
- Measure first: how often the guard fails on Chromium transient UI and on ordinary page clicks.
- On guard failure, the person's window is back above the target's by the end of the action, or the failure is prevented.
datalist/shared-behind/p-element: raised at end 0/N on ≥40 rows. Main's other shared-mode route-3 cells: unchanged.
Activity
Evidence: #453's one shared-mode end raise pinned as main's own route…
macOS engine: a click on a row of Chrome's omnibox popup, its permiss…
Own native engine M5 T10b' part 1: the window-order oracle, a target …
Own native engine M5 T10b' part 1: what the matrix records about each…
Own native engine M5 T10b' part 1 fix wave: no sample vanishes, per-c…