mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-03 19:47:10 +00:00
fix(runner): name a builtin scroll by its drag origin
A builtin gesture carries endpoints and no selector, so every scroll rendered as "Scroll down " in the prompt's recent-action memory and two scrollable regions were indistinguishable. Claude-Session: https://claude.ai/code/session_01Fj4wJUikdABuMQEETwW55J
This commit is contained in:
1 parent
b5f64bf665
commit
ea17eed739
2 files changed
+22
-1
No files matched your search
@@ -302,7 +302,14 @@ func describeAction(action verifier.Action) string {
|
||||
case verifier.ActionKindInputText:
|
||||
return fmt.Sprintf("InputText %s = %q", actionTarget(action), action.Text)
|
||||
case verifier.ActionKindScroll:
|
||||
return fmt.Sprintf("Scroll %s %s", action.Direction, action.On)
|
||||
// A builtin gesture carries endpoints rather than a selector, so name the
|
||||
// container by where the drag starts; that is what tells two scrollable
|
||||
// regions apart in the recent-action memory.
|
||||
target := action.On
|
||||
if target == "" {
|
||||
target = fmt.Sprintf("(%d,%d)", action.FromX, action.FromY)
|
||||
}
|
||||
return fmt.Sprintf("Scroll %s %s", action.Direction, target)
|
||||
case verifier.ActionKindSwipe:
|
||||
// Coordinates make a repeated identical swipe recognizable in the
|
||||
// prompt's recent-action memory.
|
||||
|
||||
Reference in new issue
Block a user