Commit cb57696
fix(intro-screen-native): catch the trailing drag whatever order it arrives in
The Android e2e flow failed deterministically (both the first attempt and the
retry) at `Assert that "Active slide: 3" is visible`. The CI video shows the
widget reach slide 3, then snap back to slide 1 and increment the change
counter, so the trailing drag the previous guard was written for still got
through.
It got through because the guard required evidence that a programmatic scroll
had landed (settledScrollTarget), and that evidence is not always recorded: the
settling list can emit its trailing scrollBeginDrag BEFORE the scroll's own
momentum end, and onScrollBeginDrag clears the pending target, so the branch
that would have set settledScrollTarget never runs. The guard was then skipped
and the stale offset was treated as a swipe.
Drop the bookkeeping and rely on the geometry instead. The list is
pagingEnabled, so a drag settles at most one page from where it began; a
momentum end further away than that cannot be a finger regardless of what came
before it. Covered by a test reproducing the CI ordering, which fails without
the change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent ccedcd9 commit cb57696
2 files changed
Lines changed: 42 additions & 21 deletions
File tree
- packages/pluggableWidgets/intro-screen-native/src
- __tests__
Lines changed: 12 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 83 | | |
88 | 84 | | |
89 | 85 | | |
| |||
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
98 | | - | |
99 | 94 | | |
100 | 95 | | |
101 | 96 | | |
| |||
360 | 355 | | |
361 | 356 | | |
362 | 357 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | 358 | | |
368 | 359 | | |
369 | 360 | | |
| |||
372 | 363 | | |
373 | 364 | | |
374 | 365 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
383 | 378 | | |
384 | 379 | | |
385 | 380 | | |
| |||
Lines changed: 30 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
226 | 250 | | |
227 | 251 | | |
228 | 252 | | |
229 | 253 | | |
230 | 254 | | |
231 | 255 | | |
232 | 256 | | |
233 | | - | |
234 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
235 | 261 | | |
236 | 262 | | |
237 | 263 | | |
| |||
0 commit comments