Repository navigation
Engine: a pointer action outside the screenshot is refused, and every scroll is confirmed, falling back to the scroll area's bar, never answering success for a scroll that moved nothing (#328) - #338
Merged
Conversation
… scroll is confirmed by its container under the point, with the bar as the fallback (refs #328) The design session's ruling b1921fc3 on #328's spike: - The refusal: the observed screenshot keeps its image's size, and screenshotPoint, which every coordinate passes (a click's, a scroll's, a drag's start and end), refuses a point outside 0 <= x < width, 0 <= y < height as pointOutsideScreenshot, before anything is read or posted. A drag's middle lies between its ends. A drag can no longer end outside the window (#334). - The confirmation (ScrollConfirm.swift): the hit's container (the nearest AXScrollArea, else an AXScrollDownByPage ancestor or an AXWebArea) is read before the wheel: its bar on the axis, its content's frame, a descendant about 40% into the viewport (the spike's read-back), and the hit itself when it lies inside and is smaller (a nested scroller). After the post it is polled every 15 ms for up to 300 ms (named constants), stopping at the first move the asked way. - The fallback: nothing moved, not at the end, the container's own bar settable: its AXValue written by delta / (content - viewport), AXContentSize where the content's frame does not scroll, nothing posted, then polled again with only the content, the descendant or the hit counting. - The answers: moved, success with meta.scroll; at the end before and after, success with atEnd and a note; otherwise scrollUnconfirmed. The posted wheel is unchanged. OutsideScreenshotTests 4, ScrollConfirmTests 20, ScrollWheelUnchangedTests 1; TuningTests' two coordinate tests aim inside the image. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ote reaches the tool result's text (refs #328) scroll joins the noted methods and scroll the optional input meta, reset per call. The new test also carries scrollUnconfirmed and pointOutsideScreenshot through to the model with their sentence, name and meta; it fails without either change. Sminos-Session: cursor235#b93055dd (cua on macbook)
…agraph in agent-cursor.md, plugin 0.27.11 (refs #328) The entry records the corrected defect (#324's scrolls aimed below their windows, every scroll answered success), the spike's findings, the refusal and where it sits, the confirmation, the fallback's conversion and its precision, the answers, the costs, the limits (a drag out of the window, #334; a container with no bar cannot tell its end) and what the hosted check must verify. The Design's Scroll and the Interfaces' error names and meta carry it. agent-cursor.md gains a paragraph after the stale-point one; the docs test, repl-parity's docs oracle, PROVENANCE.md and the surface inventory's Table 3 addition (2026-11-08, #328) carry it. Sminos-Session: cursor235#b93055dd (cua on macbook)
… fallback writes only that scroller's own bar, a clipped hit counts by its trailing edge, the window is 800 ms, and the end read before the wheel answers at once (refs #328) The review of f859ce6..b228192 (P1, P2) and the design session's acceptance 08d673c3: - P1 / gate (c): the container is found in one walk, nearest first: an AXScrollArea, an element advertising any page scroll, or an AXWebArea that is not its scroll area's own page. The fallback writes only that container's own bar, and not at all in web content (fallbackSkipped "web": browsers expose overflow divs, and Chrome iframes, as plain groups) or past a smaller element that does not hold the hit (fallbackSkipped "clipped": an unexposed scroller). - P2: each element measure keeps both edges on the axis; a hit clipped at its scroller's top moves only its trailing edge. - scrollConfirmWindowMs 800 (the hosted early read of gate b, run 42535468711). - The container's bar at its end before the wheel: success at once with atEnd and endBefore, the wheel still posted, nothing polled or written; the note says only that what is at the point is scrolled as far as it goes. pageScrollActions (Routes.swift) is shared. ScrollConfirmTests 22; the service test's at-end note follows the text. Sminos-Session: cursor235#b93055dd (cua on macbook)
…fallback rule, both edges, the 800 ms window and the end answered before the wheel (refs #328) The at-end sentence in agent-cursor.md (and its docs test, parity's docs oracle and the surface inventory) now says the result's text says so, not that nothing moved. The Interfaces' scroll meta gains endBefore and fallbackSkipped. Sminos-Session: cursor235#b93055dd (cua on macbook)
… pinned at a clipping edge, never for one that only grows (refs #328) The re-review of e0c24b8 (one P2): any trailing-edge change counted, so content appended below the visible rows during an unanswered upward wheel answered moved at an unchanged offset. Now the content's trailing edge never counts, and the tracked descendant's or the hit's counts only while its leading edge sits pinned, within 0.5 pt, at a clipping edge before and after (ScrollClips: the viewport's leading edge, and for the hit each ancestor's between it and the container), its visible size changing the way the asked scroll clips it. The clipped-hit test now models the div it is pinned at; testAnElementThatOnlyGrowsIsNoMove is the reviewer's case. The Decision Log's P2 line carries the correction; mutate-328.py: 62 of 65 fail a test, the 3 live-only survive. Sminos-Session: cursor235#b93055dd (cua on macbook)
…e container, a pane with no container on its chain takes the deepest scroll area under the point, the end is told without the bar at 1, and the descendant walk costs 200 nodes (refs #328) Run 42537713415 on e0c24b8 and the web pass 42540817002 on 8b5d314: - Catalyst (gate b, 3 of 3 false scrollUnconfirmed): UIKit gives every row and label the page actions, so the label under the point was its own container. A page scroller is now the top of the run of ancestors that all advertise page scrolling, and every kind of container reads its first child as its content (the spike's contentOf): the table's first row moves where reused cells jump the other way. - System Settings' content pane (gate c): its hit's chain holds no container. The deepest AXScrollArea in the window holding the point is taken (scrollAreaUnder, containerBy "window"), never a sibling nor an outer one; then the confirmation and the fallback run as usual. - Settings' sidebar at its real end (gate c): its bar reads 0.976 to 0.986 there and its outline is clipped to the viewport. The end is also told by a content frame longer than the viewport reaching its edge within 1 pt, or by the bar within 0.05 of its end with the content's last child (first, scrolling up) inside the viewport's edge. - Chrome's walk (96 to 202 ms before the wheel): budget 200, stopping at the first candidate 25 to 60% into the viewport. ScrollConfirmTests 28 (6 new, two adjusted to the 1 pt end); mutate-328.py: 74 of 77 fail a test, the 3 live-only survive. The Decision Log gains item 10, the A/B, and the Chrome animated-scroller limit. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ow scan selects only a visible one under the point, nested page scrollers with bars stay apart, and the bar-near-end rule needs a wholly visible edge child (refs #328) Round 4 of review on 8b5d314..ca835ff (two P1s, two P2s), each narrowed rather than extended: - P1: the window scan passes through empty-framed elements but selects a scroll area only when its own non-empty frame holds the point. - P1: the page-scroller run stops at an element with a scroll bar of its own (a boundary), and the bar-write fallback runs only on an AXScrollArea container with its own settable bar, never on a page scroller or a web area. - P2: the bar near its end (now within 0.03) tells the end only with the edge child wholly inside the viewport, and never over a scroll area's content frame running on past it. - P2: a page scroller's or web area's first child is a movement probe only; the extent for the end and the conversion comes only from a scroll area's content frame or AXContentSize. ScrollConfirmTests 33 (5 new); mutate-328.py: 82 of 85 fail a test, the 3 live-only survive. The Decision Log's items 4, 5 and 10 carry the corrections. Sminos-Session: cursor235#b93055dd (cua on macbook)
… atEnd after the wheel, and the fallback never writes a bar near its end (refs #328) The final hosted pass (run 42546633581 on b1d5168): Settings' sidebar reads 0.976 at its real bottom with its last row clipped, so round 4's strict edge-child rule no longer called it the end, and the fallback wrote 1.0 and answered scrollUnconfirmed after about 1.7 s, 8 of 8. The strict rule before the wheel stays. After the wheel, when nothing moved within the window and the bar read within scrollBarNearEnd (0.03) of its end before and after, the answer is success with atEnd and endBefore false; and the fallback never writes a bar already within 0.03 of its end. ScrollConfirmTests 34; mutate-328.py: 86 of 89 fail a test, the 3 live-only survive. The Decision Log gains the line. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ent frame that shows content left beyond the viewport (refs #328) Round 6 of review on 8c93f34 (one P2): a surface that ignores the wheel at offset 784 of 800, bar 0.98, answered atEnd with 16 points left. The end judged after the wheel now applies only when no scroll-area content frame runs past the viewport's edge in the scroll's direction by more than 1 point (scrollDocumentRunsOn; AXContentSize gives no position); otherwise the answer is scrollUnconfirmed. The no-write guard near the end is unchanged, and Settings' sidebar, whose outline is clipped to the viewport, still answers atEnd. ScrollConfirmTests 35; the round-6 mutation fails its test. Sminos-Session: cursor235#b93055dd (cua on macbook)
…nfirm, plugin 0.27.13 (refs #328) Conflicts resolved by keeping both sides: the plugin at 0.27.13 (the design session's ruling ccc119c9); PROVENANCE's agent-cursor row names #318's amendment of the background-click paragraph and #328's paragraph; the surface inventory keeps #318's Table 3 addition, then #328's; the Decision Log keeps #318's entry before #328's, since #318 merged first; repl-parity's docs oracle names both additions, and its text equals the merged agent-cursor.md byte for byte. Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
…limit stated and option B logged as debt (refs #328) 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.
Summary
#328 was filed as "AppKit drops a background scroll". The spike found that AppKit doesn't drop it. The engine answered
successfor scrolls that moved nothing, and for pointer actions aimed outside the window. Every one of main's 102 answered scroll cells saidsuccess. This PR makes both answers truthful:pointOutsideScreenshotbefore anything is posted.success, with the measured move.success, withatEndand text saying so.scrollUnconfirmed, neversuccess.The posted wheel itself is unchanged; it is the vendor's route.
Closes #328
The rules (design session rulings b1921fc3, 08d673c3, e70575e5 and 8d00d2ba; the spec's #328 Decision Log entry)
cua/scroll, and the at-end note reaches the tool result's text.docs/cua-api/agent-cursor.md, carried by the docs test, parity's docs oracle, PROVENANCE.md and the surface inventory.Plugin 0.27.13. #335 took 0.27.12.
Live proof (GitHub-hosted macOS 26.7.2: Safari, Chrome for Testing, Firefox, TextEdit, Finder, System Settings, plus AppKit, SwiftUI and Catalyst probe apps; main f859ce6 against the branch)
The evidence is in
docs/evidence/2026-11-08-scroll-confirm/.pointOutsideScreenshotscrollUnconfirmed; first move p95 at most 472 msatEndat once, no write (3–77 ms)scrollUnconfirmedafter the windowatEnd, no write; 2/8 a no-op bar write andscrollUnconfirmed(the limit below)Runs:
The kit is
probe/328-measure.Cost
Limits
scrollUnconfirmedafter the window.scrollUnconfirmedafter about 1.7 s. System Settings' sidebar is one: its AXContentSize flickers, and its bar reads 0.952–1.0 at the real bottom. Writing only on positive evidence that content continues is logged in tech-debt-tracker.md.scrollUnconfirmed; the window scan runs only for a coordinate.Tests and review
OutsideScreenshotTestsholds 4,ScrollConfirmTests35, andScrollWheelUnchangedTests1.Sminos-Session: cursor235#b93055dd (cua on macbook)