You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(scroll): find off-screen targets in one command with --until (#2436)
* refactor(interaction): extract the scroll command runtime out of gestures.ts
* feat(scroll): add --until <selector>, report honored travel, fix web amount units
* test(scroll): cover --until through the provider-backed integration path
* perf(selectors): keep the scroll-until predicate off the eager import path
* fix(scroll): refuse an unreadable capture instead of reporting end-of-content
* fix(selectors): keep the capture-readability check off the eager import path
* test(selectors): use a declared snapshot quality state in the capture fixtures
* fix(scroll): read the capture quality verdict under the spelling the backend uses
* refactor(scroll): collapse --until onto the one route that runs it
* refactor(scroll): drop unexported until types and duplicated guidance prose
* test(scroll): fix the climbing fixture and drop duplicated route-level cases
* refactor(scroll): delete the dead command-runtime executor and reuse canonical predicates
* refactor(interaction): keep requireResolvedPoint local to the gesture runtime
@@ -279,7 +301,7 @@ test('runScrollEdgePasses: throws a COMMAND_FAILED AppError once the pass limit
279
301
'scroll bottom reached the safety limit before the snapshot showed the edge',
280
302
);
281
303
assert.deepEqual(error.details,{
282
-
hint: 'The scoped scroll container still reports hidden content. Use a smaller manual scroll + snapshot loop to inspect the current state.',
304
+
hint: 'The scoped scroll container still reports hidden content. Run scroll <dir> --until <selector> to stop on the element you are after, or snapshot -i to inspect the current state.',
@@ -56,7 +68,7 @@ export async function runScrollEdgePasses<TResult>(params: {
56
68
'COMMAND_FAILED',
57
69
`scroll ${edge} reached the safety limit before the snapshot showed the edge`,
58
70
{
59
-
hint: 'The scoped scroll container still reports hidden content. Use a smaller manual scroll + snapshot loop to inspect the current state.',
71
+
hint: 'The scoped scroll container still reports hidden content. Run scroll <dir> --until <selector> to stop on the element you are after, or snapshot -i to inspect the current state.',
60
72
},
61
73
);
62
74
}
@@ -69,19 +81,31 @@ export async function runScrollEdgePasses<TResult>(params: {
69
81
return{ passes, result };
70
82
}
71
83
72
-
exportfunctionformatScrollEdgeMessage(
73
-
direction: ScrollDirection,
74
-
edge: ScrollEdge|undefined,
75
-
passes: number,
76
-
amount: number|undefined,
77
-
pixels: number|undefined,
78
-
): string{
84
+
/**
85
+
* `honoredPixels` is the travel the gesture planner actually produced, which is not always the
86
+
* travel that was asked for: one gesture cannot cross more than the viewport axis minus its edge
87
+
* padding, so a large `amount` saturates. Naming the honored distance is what keeps
88
+
* `scroll down 3` from reporting a three-viewport scroll it never performed.
0 commit comments