fix: use desktop scroll events on macOS#863
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
Review: use desktop scroll events on macOSNice — the wiring is thorough (contract, traits, fixtures, runner-session allowlist, provider integration all updated), and I confirmed the coordinate space is right: A few things to address: 1. Direction may invert with "natural scrolling" (please verify)
2. The
|
Follow-up: deeper re-checkTraced two of the points above through the full code path; here's the refined read. Natural-scroll direction — confirmed by mechanism, not just "maybe"macOS inverts The provider integration test doesn't exercise the real reported coordinates
Reported frame is hand-built instead of using the shared helperEvery other gesture builds its reported frame via Correction to my earlier "pixels computed twice" noteThat's already handled deliberately — 🤖 Automated review via Claude Code |
|
Addressed the scroll review points in
Local validation passed ( |
|
Second-pass review found two contract issues to handle before this comes out of draft:
After patching, please reply with what changed and which focused route/batch validation proves the cap/reporting behavior. |
|
Addressed the second-pass contract comments in
Validation passed locally: focused unit/provider tests, |
|
Latest-head review found one remaining blocker in the duration reporting fix:
Please move duration reporting behind the macOS desktop result only, and add an iOS/tvOS regression test that passes |
|
Addressed the latest duration-reporting blocker in
Focused validation: CI status when I stopped watching per request: all listed jobs green except one Smoke Tests matrix job still pending, so the PR remains draft until that last job completes green. |
|
Summary
Route macOS app-session scroll through a desktop XCTest scroll command instead of the Apple fused mobile drag path, and keep iOS/tvOS on their existing mobile/focus scroll behavior.
Add
--duration-msfor scroll and threadpixels/duration through CLI, batch input, daemon/request context, runtime/provider contracts, and the macOS runner command. Non-macOS backends accept the shared duration option shape but ignore timing and no longer echodurationMsas honored.Closes #856
Touched-file count: 37.
Validation
Focused contract and route coverage passed:
pnpm exec vitest run --project unit src/core/__tests__/dispatch-scroll.test.ts src/commands/interaction/runtime/interactions.test.ts src/commands/batch/cli.test.ts src/platforms/ios/__tests__/index.test.ts;pnpm exec vitest run --project provider-integration test/integration/provider-scenarios/macos-desktop.test.ts.Latest-head focused regression passed on
1981502:pnpm exec vitest run src/platforms/ios/__tests__/index.test.ts, covering iOS fused scroll and tvOS remote scroll with ignoreddurationMsomitted from results.Required local gates passed on
1981502:pnpm build,pnpm check:quick,./node_modules/.bin/fallow audit --base origin/main, direct fulloxfmt --check,git diff --check.pnpm build:xcuitestpassed earlier for the Swift runner changes; the latest commit only touched TypeScript Apple normalization/tests.GitHub Actions on
1981502: Fallow Code Quality, Integration Tests, Unit Tests, Coverage, Lint & Format, Typecheck, Bundle Size, Web Platform Smoke, iOS Runner Swift Compatibility, CodeQL, and 3/4 Smoke Tests were green when CI watching was stopped; 1 Smoke Tests matrix job was still pending.Manual native macOS verification passed earlier in System Settings, session
issue-856-scroll-coordinate(closed). Beforescroll down --pixels 200 --duration-ms 200, Accessibility showed top rows like Vision, VoiceOver, Zoom, Display, Motion. The command returnedpixels: 200,durationMs: 200,x1: 1150.5,y1: 495.5; the next snapshot showed later rows including Captions, Live Captions, Name Recognition, and Motor. A batch with fourscroll downsteps atpixels: 200,durationMs: 50executed 4/4 and advanced further to Motor, Voice Control, Keyboard, Pointer Control, Switch Control, Speech, and Siri.Known residual risk: I did not verify a react-native-macos sample screen in this run; the requested live verification was against native System Settings. The PR remains draft until the final pending Smoke Tests job completes green.