Skip to content

Engine: refuse a coordinate click whose screenshot target has moved or been replaced (stale-point guard) #296

Closed

Description

@SSFSKIM

Problem

A coordinate click is placed in the connection's last screenshot. If the app re-lays out after that screenshot, the engine posts the click at the old point, where a different control may now sit, and answers success. #294's spike measured this on Chrome for Testing 156:

Here the stray click was harmless. Elsewhere the point could now hold a live control such as Delete.

Intent

Before posting a coordinate click, check that what the screenshot showed at the point is still there. Refuse, with nothing posted, when it is not. The design session ruled this on 2026-11-05 (1ea561bc, ee29283e):

  • Semantics: refuse, in both shared and dedicated modes.

  • What is recorded: each tree node's frame, at every observation that returns a screenshot. The lineage keeps handles and identity today, not frames.

  • What is compared: only the deepest recorded node whose frame contains the point. It counts as the same node by CFEqual, or by a re-created handle with the same role and a frame within 2 pt.

  • When to refuse:

    • the node is gone;
    • its re-read frame no longer contains the point;
    • the hit-test at the point is now a different interactive element.

    A different non-interactive hit (text or group) inside a still-in-place recorded node passes.

  • Where it does not apply: where macOS engine: a left click into a background Chrome page is swallowed as the window's activating click, and cua reports success #282 element-routes the point.

  • The error: names the old and the new element, and asks for a re-observation.

Constraints

  • Measure false positives first, before the refusal is built. Use a dynamic page: a CSS animation, a ticking counter, a feed that prepends items, and a scrolled list. Bring that table to the design session before the PR.
    • A refusal whose target is still under the point means the guard needs narrowing.
    • A refusal where the target really moved is correct.
  • State the vendor divergence in the limits: cua refuses where the vendor would post blindly.
  • Cost: one frame read per click, beside the hit-test that the route already takes.
  • Board: spawned by macOS engine: a route-3 click on a background Chrome's toolbar after 20 s or more of inactivity reports success but is not delivered #294. No parent and no blocker (consciously N/A).

Success criteria

  • A hosted A/B on Chrome for Testing in which a click at a re-laid-out point is refused with nothing posted. A click at a still-in-place point is delivered as before.
  • The false-positive table, ruled acceptable by the design session.
  • A Decision Log entry in docs/doperpowers/specs/2026-10-18-own-native-engine-design.md.

Activity

  1. added
    enhancement
    status:ready-for-implementer
    priority:P2
    on Nov 6, 2026
  2. added a commit that references this issue on Nov 6, 2026
  3. added
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 6, 2026
  4. SSFSKIM commented on Nov 6, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: Taken by cursor235: false-positive spike first (design session ruling ee29283e), then the build

  5. 23 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions