Skip to content

Engine: the stale-point guard keeps a hit that is itself a recorded, unmoved node at the point (recordedHit) - #308

Merged
SSFSKIM merged 5 commits into
mainfrom
fix/305-recorded-hit
Nov 6, 2026
Merged

SSFSKIM merged 5 commits into
mainfrom
fix/305-recorded-hit

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Summary

#296's stale-point guard refused ordinary coordinate clicks on still pages, and now it keeps them. On main (both 0.26.0 and 0.27.0), with nothing changed since the screenshot, cua answered screenChangedSinceScreenshot on:

  • Safari's address field and toolbar buttons: 12 of 12 refused;
  • Finder's list-view file names: 12 of 12;
  • GitHub's code view and branch picker: 6 of 6;
  • Wikipedia hatnote links: 4 of 8.

The cause: the guard picked the deepest recorded node at the point, and required the live hit to be that node, its ancestor, or inside it when incomplete. Stacked content, wrapped link text and hit regions that reach past AX frames all break that.

Closes #305

The rule

From the design session's rulings 45f5e5be and a27fc57c; the spec's #305 Decision Log entry has the full text.

Where the verdict would be interactiveHit, or pressedOther on #282's element route, the click passes as recordedHit when all three hold:

  1. The live hit is itself a recorded node. It matches by CFEqual, or, while that node's recorded handle is gone, by Engine: refuse a coordinate click whose screenshot target has moved or been replaced (stale-point guard) #296's full re-created identity: role, frame within 2 pt, and label.
  2. The hit hasn't moved. Its live frame is within 2 pt of its recorded frame.
  3. The point lies inside a shown frame, widened by 2 pt, in screenshot space. That frame is either:
    • the hit's own;
    • or its nearest recorded ancestor's, if that ancestor is unmoved, is not AXWindow, AXWebArea, AXScrollArea, AXSplitGroup or AXApplication, and covers at most a quarter of the window.

What doesn't change:

The new meta field cua/stalePoint.recordedHitBy records hit or ancestor. The added cost is p95 3.4 ms on clicks that reach the rule. Plugin 0.27.1.

Limits

  • Two recorded elements that overlapped at the point can trade places on top while both stay put, and the click lands on the one now on top.
  • Popovers hidden in place, measured:
    • A recorded popover hidden with opacity:0 keeps receiving the click.
    • With opacity:0 plus pointer-events:none, the click goes through to the button under it, because the AX hit-test still answers the popover's text.
    • Both pass as nonInteractiveHit, not as recordedHit, and main does the same.
    • visibility:hidden is refused as nodeGone.
  • Inside a small, unmoved ancestor, an unmoved recorded control passes for a point in that ancestor's padding beside it.

Live proof (GitHub-hosted macOS runners, 2 reps, main 4525925 against the branch)

Evidence is in docs/evidence/2026-11-07-recorded-hit/.

Check Main Branch
#305's spots: Safari toolbar, Finder names, GitHub code view, Wikipedia (flagged points) 35 of 40 refused 0 refused
Still-page sweep: about 20 ordinary controls per app, at the centre and 2 pt inside an edge, in Chrome (GitHub and Wikipedia), Safari, Finder and TextEdit 20 refused (62e9f02 run) 0 refused
Safari sweep on the final head (two runs) 16 + 16 refused 0 + 0 refused
#296's stale suite: #294's re-layout, feed, swaps, Like (12)→(13), moved and removed controls, Safari, native every stale cell refused every stale cell refused, same reasons
Safari's address-field padding point refused kept, recordedHitBy: ancestor; focus moved to the field

Runs:

Tests and review

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

…e, is kept as recordedHit (refs #305)

The design session's ruling 45f5e5be on #305's live check: where #296's guard would refuse an
interactive hit (interactiveHit) or an element route's target (pressedOther), it keeps it when
the hit is a recorded node (CFEqual, or #296's re-created identity while that node's handle is
gone), its screenshot-time frame widened by 2 pt holds the point in the screenshot's space, and
its frame read now widened by 2 pt holds the posted point. The chosen node's own checks run first,
unchanged. RecordedHitTests: GitHub's overlay sibling, Safari's toolbar over the page view, a
wrapped link text, Finder's 1-pt edge, each rule's refusals, every #296 stale class, the element
route.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…eta's reasons and the limit (refs #305)

Sminos-Session: cursor235#b93055dd (cua on macbook)
…e clipped out at the point refuses (refs #305)

The coordinator's ruling on the build: the screenshot showed an element at a point only where its
clipping ancestors left it showing. A recorded link scrolled under Chrome's toolbar, answered by
the hit-test at a toolbar point, is refused wholly and partly clipped out; the test fails under
the full-frame reading. The four #305 mechanisms stay kept. The spec's #305 entry says so, with
the implementer's three readings.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ed, the point in its shown frame or its nearest recorded ancestor's (refs #305)

The hosted A/B on 62e9f02 (runs 42269993080, 42294564231, 42299375682) refused one still-page
point: Safari's address field 8 pt above its frame, inside its toolbar item's padding. Rule 2 is
now that the hit has not moved (its live frame within 2 pt of its recorded one); rule 3 lets the
point lie in the hit's shown frame or, failing that, its nearest recorded ancestor's, widened by
2 pt, when that ancestor has not moved, is no area role and covers at most a quarter of the
window. The meta's recordedHitBy says which carried it. The spec's #305 entry states the
amendment and the opacity limits.

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

chatgpt-codex-connector Bot commented Nov 6, 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-06T23:25:06.700287Z d19f862 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 f20a25e into main Nov 6, 2026
5 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 may refuse ordinary clicks on still pages (GitHub code view, Safari toolbar, Finder title bar): live check

1 participant