Repository navigation
Engine: a drag whose end lies outside the screenshot is refused with a sentence that says the drop cannot be done (refs #334) - #339
Merged
Conversation
…a sentence that says the drop cannot be done (refs #334) #328's pointOutsideScreenshot sentence tells the model to give a point inside the image, which for a drag's end invites clamping it into the window, so the item drops at the source window's edge. A drag's end outside now answers "A drag cannot end outside the window the screenshot shows: dropping onto another app's window or the desktop is not supported. Nothing was sent.", still pointOutsideScreenshot and with no coordinate range. The start, placed first, keeps #328's sentence. screenshotPoint, coordinatePoint and coordinatePlacement take a dragEnd flag that drag sets for the end only. OutsideScreenshotTests.testADragsEndOutsideSaysTheDropCannotBeDone. The spec's #334 entry and an amendment note on #328's item 3. Plugin 0.27.15. 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.
refs #334. #334 stays open: it is the feature of dropping across windows. This PR changes only the refusal text.
What changed
#328's
pointOutsideScreenshotuses one sentence for every coordinate: "Give a point inside it: x from 0 to W−1 and y from 0 to H−1." For a drag's end, that remedy misleads. A model that meant to drop onto another app or the desktop would clamp the end into the window, and the item would drop at the edge of the source window.When only a drag's end lies outside the screenshot, the refusal now reads:
pointOutsideScreenshot, so callers that branch on the name are unchanged.screenshotPoint(Screenshot.swift),coordinatePointandcoordinatePlacement(ElementInput.swift) take adragEndflag.drag(ScrollDrag.swift) sets it for the end only.Validation Evidence
OutsideScreenshotTests.testADragsEndOutsideSaysTheDropCannotBeDonefailed to compile before the change (extra argument 'dragEnd' in call). It checks:swift testin native/engine:Executed 1056 tests, with 1 test skipped and 0 failures.ci-gate --gates plugin,test,engine-swifton ffcd6b8 passed: plugin, engine-swift and test all PASS, GREEN https://github.com/SSFSKIM/cua/actions/runs/42556691430drag's glue that sets the flag for the end. It reads live AX.Sminos-Session: cursor235#b93055dd (cua on macbook)