Repository navigation
Add DRAG - #25
Merged
Merged
Add DRAG#25
Conversation
DRAG source to target drags one element onto another. A bare `to` separates the two locators, which both use the text default engine and the strictness rules; a quoted "to" is text, and `whirl fmt` keeps its quotes. The shim runs the gesture itself, because Playwright's dragTo cannot hold: it hovers the source, presses, holds 500 ms, waits for the target to be visible and stable, moves in 10 steps, waits two animation frames, and releases, releasing even when a step fails. The hold serves drag code that starts after a press delay, and the steps serve code that starts after a short move. The target check scrolls it into view instead of a trial hover, which stops a native drag in Chromium. ACT runs dragAndDrop, whose one argument is the ref of the element to drop on; an unknown ref or the dragged element itself fails with act-invalid-decision. With --jev, drags go to the model. Tests cover a native board, a board that starts after an 8px move, one that starts after a 300ms press, drags into and across frames in all three engines, an ambiguous target, and the ACT paths. In WebKit a page that took a native drag gets no pointerdown until it loads again; the SPEC says so, and the board test runs its pointer drags first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Stacked on #24. The second of three pointer-action PRs: drag and drop, as a flow command and as an
ACTmethod.Change
DRAG source to target. A baretoseparates the locators; a quoted"to"is text, andwhirl fmtkeeps its quotes. Both locators use thetext:default engine and must match one element.dragTocannot hold, so the shim usespage.mouse.dragAndDropwith one argument: the ref of the element to drop on. An unknown ref, or the dragged element itself, fails withact-invalid-decision. The prompt explains the argument. With--jev, drags go to the model.What the tests found
dragTo.mousedownbut nopointerdownon later presses until it loads again. Playwright'sdragTobehaves the same. SPEC §7 says so, and the board test runs its pointer drags first.Not in the plan
The plan listed a
targetDescriptionreport field. The action'slinealready names both elements (DRAG role:article "Card" to role:region "Done"), so the report keeps its shape.Tests
ACT: a model drag, an unknown drop target, and a--jevdrag that goes to the model.fmtquoting ofto, the decision, and the prompt.kanban-movetask on a native board.mise run checkpasses. SPEC §3.1, §6.1, §6.2, §7, §7.4, §17, and §18, the shim protocol doc, and the CHANGELOG describe the change.🤖 Generated with Claude Code