Skip to content

Engine: a click refuses when the page added an element over the point since the screenshot, as newElementOverPoint (#330) - #352

Merged
SSFSKIM merged 10 commits into
mainfrom
fix/330-new-element-over-point
Nov 9, 2026
Merged

SSFSKIM merged 10 commits into
mainfrom
fix/330-new-element-over-point

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

After the model types into a search field, a page's suggestion list can cover the control it means to click next. Before this change, the click landed on a suggestion, and the engine answered success. In #316's spike, 36 of 48 such clicks navigated away. Now, when the hit lies in an element the page added over the point since the screenshot, the click is refused before anything is posted. The refusal is screenChangedSinceScreenshot, with the reason newElementOverPoint. Its sentence tells the model to take a new screenshot, or press Escape to dismiss what appeared.

Closes #330

The rule: dL (design session ruling 11bec0ed; the spec's #330 Decision Log entry)

Docs: docs/cua-api/agent-cursor.md's stale-point paragraph says which lists are refused, which are missed, and to press Escape or take a new screenshot after typing into a field that offers suggestions. The surface inventory, the docs test, parity's docs oracle and PROVENANCE.md carry it.

Plugin 0.27.23.

Live proof (GitHub-hosted macOS 26.7.2: Safari, Chrome for Testing, Firefox, Finder, TextEdit, and an AppKit mail-like table)

The evidence is in docs/evidence/2026-11-09-new-element-over-point/.

The gate: main e31bb1f against 7f6eb3d, run https://github.com/SSFSKIM/cua/actions/runs/42585577476.

Cells Main Branch
Covered clicks under five list kinds (6 per kind per browser) kept, wrong Safari 30/30, Firefox 30/30, Chrome 24/30 refused
Wikipedia's own suggestions 14 wrong clicks kept all 24/24 refused
Lists shown by opacity (the stated limit) kept kept, 0/6
967 gate clicks: HN, a GitHub PR, Wikipedia, MDN, #305's still sweep and near-change scenes, a lazy feed, an SPA re-render, a late banner, re-created controls, replaced link text, a budget-cut page, Finder, TextEdit, a mail-like table – 0 newElementOverPoint

Cost: the whole guard's p95 is 2.3–2.9 ms on the branch against main's 2.6–3.5. Most clicks read nothing more.

The spike: runs https://github.com/SSFSKIM/cua/actions/runs/42556940112 and https://github.com/SSFSKIM/cua/actions/runs/42560125050, kit probe/330-measure. It measured seven candidates, and dL had 0 false refusals in every set.

Ticking text (design session 1ea561bc:554; run https://github.com/SSFSKIM/cua/actions/runs/42611234157, main 536066f against 494857c):

Limits

  • A list the page shows without adding elements (by opacity, or moved into place) still takes the click.
  • In Chrome, a list that overflows its field's container is missed, because Chrome's hit-test answers the covered control. That is 6 of Chrome's 30.
  • Chrome's own <datalist> popup lets a click pass through.
  • The rule runs only in web areas.

Tests and review

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

…over the point since the screenshot, as newElementOverPoint (refs #330)

The design session's ruling 11bec0ed on #330's spike (rule dL, "dL hit chain, listed"):
- The observation keeps, beside the stale-point record, every element its walk recorded, framed or frameless, with
  whether the walk recorded all of its children (screenshotChildrenRecorded, ObservedScreenshot.recorded).
- Where the recorded node lies in an AXWebArea and #296's checks and rule G keep the point, rule G's walk of the hit's
  parents (liesIn now returns the chain) is read from the web area down: the topmost element the record lacks whose
  parent the record holds with every child refuses when that parent's AXChildren lists it now. A budget-cut parent, an
  unlisted element (Chrome's button-label text) and anything the record holds stay silent. A refusal #296 or G already
  made keeps its reason.
- The recorded node as found now, or an element holding it, is not new (#296's re-created control, and a wrapper
  re-created around it).
- The refusal is screenChangedSinceScreenshot with its own sentence: a new element, such as a suggestion list or
  popup, has appeared over the recorded element; take a new screenshot or press Escape before clicking. The meta's
  stalePoint carries reason newElementOverPoint and newElementReads.
NewElementGuardTests (7); 1,063 engine tests pass, 1 skipped as before.

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

testTheScreenshotKeepsItsRecordedElements, as #316's window list is: it kills the one mutation of mutate-330.py that
the guard's suite could reach but did not. 20 of the script's 24 mutations failed a test before; now 21, the three
left only a live click reaches (the observation not keeping the elements, the guard's and the recheck's call not
passing them).

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ent refusal and its limits, plugin 0.27.16 (refs #330)

The entry records the spike's findings and candidates, rule dL as built (the record's elements, the chain from G's
walk, "every child recorded", "listed"), what the build settled (the node as found now and what holds it are not new;
a refusal keeps its reason; every kept reason judged when G walked; newElementReads), the refusal, the cost, the
limits, and the merge gate of rulings 11bec0ed and 31a62775. #316's item 8 notes the amendment; the Interfaces'
stalePoint reasons gain #316's two and newElementOverPoint, and its fields #316's costs and newElementReads.
agent-cursor.md's stale-point paragraph now says the guard refuses a web page's new element over the point, carries
the ruling's limit text as approved and Chrome's <datalist> popup passing a click through; the docs test, repl-parity's
docs oracle, PROVENANCE.md and the surface inventory's Table 3 addition (2026-11-08, #330) carry it.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…w, nor counts a failed AXChildren read as complete (refs #330)

The review of 364e017..51ce413, two P2s:
- A hit #305 keeps as a recorded control (recordedHit), its own handle or one re-created in place, now counts as a
  recorded node as found now, beside the node at the point: dL is silent on it and on anything holding it.
  newElementOverPoint takes the list of found nodes. testARecordedHitReCreatedInPlaceIsNotNew is the reviewer's
  repro (#305's code view in a web area, the textarea re-created at its role, frame and label), with a re-created
  wrapper too.
- ElementData.childrenRead says whether AXChildren was read (an error slot decodes as no children), the walk carries
  it into the record (ScreenshotNodeRead.childrenRead, both emit sites), and screenshotChildrenRecorded never counts
  an element whose read failed as complete. testSilentWhenTheParentsChildrenWereNotRead (a button whose children read
  failed at the observation, its label listed at the click) and testTheWalkRecordsAFailedChildrenRead (over
  WalkTests' fake tree; FakeTree.childrenUnread).
NewElementGuardTests 11; 1,067 engine tests pass, 1 skipped as before.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…#330's entry records the review's fixes and the acceptance cd365f0e (refs #330)

testTheGuardsRecordOnlyReadsCarryAFailedChildrenRead (VisibleFirstTests, over the width-rule list now built by
omittedList) kills the one review mutation the first fix's tests left: the walk's record-only emit site dropping
childrenRead. mutate-330.py: 29 mutations, 26 fail a test, the 3 live-only survive. The Decision Log's #330 entry notes
the design session's acceptance of the found-node narrowing (cd365f0e), its extension to a recordedHit, the failed
AXChildren read, the cost on a recordedHit, and the counts: 1,068 engine tests pass, 1 skipped as before.

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

Sminos-Session: cursor235#b93055dd (cua on macbook)
…he version waits for the merge turn (refs #330)

Sminos-Session: cursor235#b93055dd (cua on macbook)
…ion Log, plugin 0.27.23 (refs #330)

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

chatgpt-codex-connector Bot commented Nov 9, 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-09T11:35:36.681298Z 494857c 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.

… (refs #330)

Sminos-Session: cursor235#b93055dd (cua on macbook)
@SSFSKIM
SSFSKIM merged commit 3c66931 into main Nov 9, 2026
5 checks passed
SSFSKIM added a commit that referenced this pull request Nov 9, 2026
…d (refs #298)

main's tree is #330's final head e46319b, squash-merged, which this branch held up to 494857c. Every file #330
touched conflicted with that history. Each was resolved to this branch's side, plus #330's last delta
(494857c..e46319b: its Decision Log entry and its evidence README). The merged tree differs from main only by
#298's own changes.

Sminos-Session: cursor235#b93055dd (cua on macbook)
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.

Page-made suggestion lists take a coordinate click aimed at the control under them (wrong target, all browsers)

1 participant