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
@@ -62,6 +62,20 @@ func TestActionForCandidatePassesNonTypingThrough(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestDescribeActionNamesGesturesByOrigin(t *testing.T) {
|
||||
builtin := verifier.Action{
|
||||
Kind: verifier.ActionKindScroll, Direction: "down",
|
||||
FromX: 200, FromY: 500, ToX: 200, ToY: 340,
|
||||
}
|
||||
if got := describeAction(builtin); got != "Scroll down (200,500)" {
|
||||
t.Errorf("builtin gesture described as %q, want the drag origin", got)
|
||||
}
|
||||
authored := verifier.Action{Kind: verifier.ActionKindScroll, Direction: "up", On: "id:List"}
|
||||
if got := describeAction(authored); got != "Scroll up id:List" {
|
||||
t.Errorf("authored scroll described as %q, want its selector", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestActionForCandidateUsesModelText(t *testing.T) {
|
||||
source := &llmSource{}
|
||||
candidate := verifier.ActionCandidate{
|
||||
|
||||
Reference in new issue
Block a user