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
{{ message }}
Repository navigation
Commit a624ec1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(scroll): name what a scroll observed and read an edge off one tree
Two pieces the directional-scroll answer needs, with no behavior change on its own.
`movement` is the vocabulary a scroll uses to say what happened to the surface: `moved`,
`at-edge`, `unchanged` when the visible content did not change, and `unobserved` when the
command could not compare anything. It is absent when the runtime cannot read a screen at
all, so a caller never has to guess whether a missing claim means "did not move".
`readScrollEdgeState` is the one pure door into the edge analyzer — the question
`canScrollFurtherAtEdge` and `scrollSurfaceFingerprint` already ask, exposed with the frame
of the container that answer was taken on. Without `containerRect`, `canScroll: false`
cannot distinguish content that ends here from a tree that named no container, and a caller
checking whether its gesture landed inside the list has nothing to check against.
return`Already at ${edge}; no hidden content ${edge==='bottom' ? 'below' : 'above'} detected`;
182
207
}
183
208
if(edge)return`Scrolled to ${edge} with ${passes}${direction} passes`;
209
+
if(movement==='at-edge'){
210
+
// The same honesty the zero-pass branch above holds: the analyzer reports no hidden content
211
+
// DETECTED, which is not a claim that the content provably ends here.
212
+
return`Scrolled ${direction} and no hidden content ${
213
+
direction==='down' ? 'below' : 'above'
214
+
} was detected`;
215
+
}
216
+
if(movement==='unchanged'){
217
+
return`Scrolled ${direction} and the visible content did not change`;
218
+
}
184
219
if(pixels!==undefined)return`Scrolled ${direction} by ${honoredPixels??pixels}px`;
185
220
if(amount!==undefined){
186
221
returnhonoredPixels===undefined
@@ -199,13 +234,37 @@ function buildScrollEdgeNoProgressError(edge: ScrollEdge, passes: number): AppEr
199
234
reason: 'scroll_edge_no_progress',
200
235
edge,
201
236
passes,
202
-
hint:
203
-
`The scroll is not reaching this container. If a field is focused, dismiss the keyboard first; if it is nested inside another scroller, target it directly with scroll <dir> --until <selector>. `+
204
-
`Some lists ignore synthesized scrolls — a raw drag moves them: swipe x1 y1 x2 y2 started inside the list.`,
Copy file name to clipboardExpand all lines: src/daemon/scroll-until.ts
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ import { SELECTOR_PIPELINE_POLICIES } from '@agent-device/selectors/selector-pip
11
11
import{
12
12
canScrollFurtherAtEdge,
13
13
pushScrollSurfaceSignature,
14
+
scrollNoProgressHint,
14
15
scrollSurfaceFingerprint,
15
16
scrollSurfaceIsStuck,
16
17
typeScrollEdge,
@@ -252,9 +253,7 @@ function scrollUntilNoProgressError(
252
253
selector,
253
254
direction,
254
255
passes,
255
-
hint:
256
-
`The scroll is not reaching this container. If a field is focused, dismiss the keyboard first; if it is nested inside another scroller, target it directly. `+
257
-
`Some lists ignore synthesized scrolls — a raw drag moves them: swipe x1 y1 x2 y2 started inside the list.`,
0 commit comments