fix(scroll): clamp WebDriver and HarmonyOS swipes inside the container
AR
13h ago+329+329+012345678901234567890123456789-38-38-01234567890123456789
Summary
WebDriver and HarmonyOS directional scrolls ignored containerRect, so a swipe could start or end outside the resolved list. Both owners now convert that rect into the swipe frame and clamp it with buildScrollGesturePlan. A shortened swipe reports pixels (dispatched) beside requestedPixels. A span that already fits, and a scroll with no container, stay unchanged.
Part of #2714 (WebDriver + HarmonyOS slice; Android done in #3746, local iOS runner left out since it plans in Swift).
AI assistance (Cursor) was used to prepare this change; I reviewed and tested it.
Validation
Tested SHA c03127a4958a7b0aecff57f6525f03e6ba3f6c4c, base d78be6c88715ad80fc658497f23f91c86bf9489b.
- Before the production edit,
pnpm exec vitest run --project unit-coreon the two scroll test files: 3 failed, 8 passed (inset-container swipes ended outside the list). After: 11 passed. pnpm check:affected --run --head c03127a4958a7b0aecff57f6525f03e6ba3f6c4cpassed (format, lint, typecheck, layering, fallow, build, vitest-related, unit).- No live WebDriver grid or HarmonyOS device; coverage and device replay lanes are CI-only.
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.