Skip to content

macOS engine: refuse a click when another live control has moved over the recorded target (#442, 0.29.1) - #492

Merged
SSFSKIM merged 7 commits into
mainfrom
fix/442-other-control-on-top
Nov 23, 2026
Merged

SSFSKIM merged 7 commits into
mainfrom
fix/442-other-control-on-top

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Closes #442. Version 0.29.1. Design rulings 1073, 1077–1080, 1085–1087, 1101.

The gap

A control slides over the recorded target between the screenshot and the click: link A sits under an inert (click-through) overlay, and button B elsewhere slides over A. Main's stale-point guard vouches for A, through #433's inert-overlay keep or the nonInteractiveHit keep, and keeps the click. On Electron the click lands on B (cold 20/20). On Chrome for Testing the element route presses the overlay group and nothing happens, a false ok.

The fix

StalePoint.swift (otherControlOnTopVerdict, movedOverPoint), and only on those two keep paths. Every other verdict stays main's.

Evidence

docs/evidence/2026-11-23-other-control-on-top/README.md. The kit is probe/442-measure, README 67d64eb. The fix was counted on c04efb4 against main 5580ac2 (7 runs), and on the merged head 8feea99 against main 33c8dd0 (7 runs), unit for unit equal.

Bar line Fix Main
slideover, CfT/Electron, cold and warm refused 20/20 each (otherControlOnTop at the text point, interactiveHit at the link point) Electron lands on B 20/20 cold, 10/10 warm at the text point; CfT cold reaches nothing
slideover, Safari refused 20/20 interactiveHit the same
Keep cells, reviewer shapes, siblingstack, ruling 1080's relabel rows row for row as main; false refusals 0
#443 decomove controlGone 20/20 CfT and Electron
#453 omnibox / popover / permission allow / block, shared-behind (8feea99) 10/10 each; frontmost, key window and raised 0; wrong row 0

80 ms margin: 3 of 3,120 Chromium rows corrected after 80 ms (95 and 82 ms on CfT, 93 ms on Electron), with a median of 29–31 ms (#480).

Cost (ruling 1101). stalePoint.ms p50 / p95, merged set:

Lane Main Fix
CfT 5.0 / 19.0 14.1 / 271.4
Electron 3.0 / 9.2 6.3 / 164.6
Safari 3.3 / 10.6 3.7 / 10.1

The wait applies only on Chromium's #433 inert-overlay keep and nonInteractiveHit keep. On those rows p50 is 116–137 ms; on all other rows the fix is within 1 ms of main. nonInteractiveHit covers ordinary clicks on page text. #491 measures how many real-page clicks take it, and tries an early exit at the first changed answer.

Review.

swift test: 1659 run, 0 failures, 1 skipped. The service tests pass.

Limits

Sminos-Session: cursor235#b93055dd (cua on macbook)

…ert layer, or past a non-interactive hit, by the control the corrected hit lies in, and refuses another live control on top (refs #442)

Ruling 1073. Kit probe/442-measure (README 2050fb4, rule cost b7beb36) measured slideover on main 5580ac2: button B
slid by a transform over an unchanged link A under a veil, and main kept the click (#433's check found A unchanged
beneath), landing on B on Electron or pressing the veil to no effect on CfT. A corrected AX hit is the page's own hit
test (1,694 of 1,695 rows agree with elementFromPoint); Chromium's first answer at a new point is approximate and
corrects after 25-61 ms with no signal; Safari's is already right.

Only where the verdict kept through #433's check, or as nonInteractiveHit (otherControlOnTopVerdict):
- On a Chromium-family app (PageEngine.chromium) the point is hit-tested again after 80 ms (stalePointCorrectionMs),
  through a bare hit-test that leaves the action's own LatestHit alone; elsewhere the first answer is judged. The meta's
  stalePoint.hitCorrection says same, changed or none.
- The hit's nearest acting control (firstActing, #443's liveControl walk, now telling no control from unclassified)
  must be one the record holds at the point (heldAtPoint: the node as found or its control now, #433's control beneath
  on its handle, the hit's recorded control by #443's content vouch, or #305's recordedHitAtPoint); otherwise
  screenChangedSinceScreenshot, stalePoint.reason otherControlOnTop, controlRole the control on top.
- With no control, a post-wait hit the record is known to lack (recordLacks: unrecorded, under a recorded ancestor with
  every child recorded) refuses too; a recorded one keeps (a scrim's answer is the scrim itself, as is CfT's approximate
  one). An unclassified ancestor, no hit or no second answer keeps.

siblingstack stays a declared limit (#479). OtherControlOnTopTests (7) cover slideover on Chromium and Safari-like,
the uncorrected hit, a scrim, a cut record, the recorded control kept, a non-interactive hit judged by its control,
siblingstack's and bgbutton's records, and the wait taken only on the two paths. Decision Log entry added.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…of a kept click (refs #442)

Sminos-Session: cursor235#b93055dd (cua on macbook)
…er the target, and puts its re-hit through #452's window check (refs #442)

Ruling 1078, from reviewer-high on adebc77 (2 P1, 5 P2: six false refusals, two wrong-target keeps). A control not
found in the record was taken for a different control, and the recorded node's live parent for its owner. Now:
- The re-hit after the 80 ms wait is a WindowHit through #452's check (appWindowVerdict, extracted from
  guardedPointVerdict, the window list read afresh): a window of the app's arriving over the point during the wait
  refuses appWindowOverPoint. The click's guard, the drag's and the element route's recheck all build it; the action's
  own hit stays the verdict's.
- A #433 candidate beneath the layer that the corrected hit names is judged by #433's test (underlyingRefusal),
  whichever candidate it is: kept as the control beneath, or refused as #433 refuses.
- otherControlOnTop only when the control is live, recorded by handle as a control, at recorded frames away from the
  point, and not the node, the node's recorded control (by handle, never a live parent) or the recorded control of
  recorded content at the point that the hit is (movedOverPoint).
- heldAtPoint and the no-control refusal (recordLacks) are gone; anything unread, unrecorded or inconclusive keeps.

OtherControlOnTopTests (10) add the reviewer's eight shapes and a relabelled named candidate; against adebc77's rule
each fails (18 assertions in 5 tests). Eleven mutations each fail a test. 1617 swift tests, 0 failures. Decision Log
entry added.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…, and reports the delayed hit's timing on its window refusal (refs #442)

The re-review of adebc77..d7b958b (5 P2 false refusals against main, 1 P3):
1. A named #433 candidate that fails #433's test is no longer refused for #433's reason; the moved-control rule decides
   (a front link shrunk away from the point while its text stays there keeps, as on main).
2. (d) asks whether the record showed any content of the control at the point, whatever the hit names.
3. A control #305's recordedHitAtPoint takes at the point (its parent's padding included) has not moved.
4. A node whose control is unknown (controlUnknown) leaves ownership inconclusive: kept.
5. Unplaced frames (CGRect.zero) establish no previous location.
6. (P3) The delayed hit's window refusal reports that hit-test's time as hitMs (correctedHitMs), click and recheck,
   keeping the action's own hit.

Five new OtherControlOnTopTests, one per shape, plus the popup test's timing; against d7b958b's rule all fail, and each
fix reverted alone fails its own test. 1622 swift tests, 0 failures. Decision Log amended.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…refs #442)

Conflicts: StalePoint.swift (#453's layers on the appWindowOverPoint verdict, inside the switch #442 moved into
appWindowVerdict: kept in appWindowVerdict, the list read once per verdict), the plugin versions (0.28.31 kept), and the
design spec's Decision Log (#453's entries, then #442's). #453's row press does not take a refusal #442's delayed re-hit
decided (overlayPressApplies requires hitCorrection nil): its decision reads the action's own hit-test, not the re-hit.
1659 swift tests, 0 failures; the service test file 44/44.

Sminos-Session: cursor235#b93055dd (cua on macbook)
Only the plugin version conflicted. Main's #489 changes reach no macOS
engine, click, observation or service path (reach note to design), so
the counted qualification on 8feea99 stands for this head.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…d's check of the control on top (refs #442)

docs/evidence/2026-11-23-other-control-on-top/README.md, from probe/442-measure README 67d64eb (ruling 1101): the rule
as shipped on f0547af, the bar for c04efb4 against 5580ac2 and 8feea99 against 33c8dd0 with run IDs, #453's
delivering cells on 8feea99, the 80 ms margin (3/3120 over 80 ms), the cost, the fake-only shapes, popupwait, and the
limits (#479, #480, #481, #482, #486, #490, #491). The Decision Log entry's limits line names #480, #490 and #491 and
links the evidence.

Sminos-Session: cursor235#b93055dd (cua on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T07:42:06.127267Z 164a4e5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit b1b1548 into main Nov 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale-point guard under an inert overlay can't see stacking: a control slid over the target, or an overlapping sibling, gets the click

1 participant