Repository navigation
macOS engine: refuse a click when another live control has moved over the recorded target (#442, 0.29.1) - #492
Merged
Merged
Conversation
…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)
…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)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
nonInteractiveHitkeep, 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.stalePointCorrectionMs), and the answer passes through macOS engine: a click on Chrome's omnibox popup is answered ok but lands on the page under it (frontmost and dedicated modes) #452'sappWindowVerdict. Safari and other engines use the first answer.screenChangedSinceScreenshotwithstalePoint.reason: otherControlOnToponly when the corrected hit's acting control is all of:stalePoint.hitCorrection(changed / same / none) andcorrectedHitMs, forwarded to the MCP result.appWindowOverPoint, never on a refusal from the delayed re-hit (overlayPressAppliesrequireshitCorrection == nil; ruling 1087).Evidence
docs/evidence/2026-11-23-other-control-on-top/README.md. The kit isprobe/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.otherControlOnTopat the text point,interactiveHitat the link point)interactiveHitdecomovecontrolGone20/20 CfT and Electron80 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.msp50 / p95, merged set:The wait applies only on Chromium's #433 inert-overlay keep and
nonInteractiveHitkeep. On those rows p50 is 116–137 ms; on all other rows the fix is within 1 ms of main.nonInteractiveHitcovers 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
recordedHit/hitAboveNodeon main and fix alike (Stale-point guard keeps a moved control at the point through recordedHit/hitAboveNode (macOS engine, Chromium) #490).controlUnknownwrapper, a parent read that fails, and an unplaced frame.Sminos-Session: cursor235#b93055dd (cua on macbook)