Skip to content

refactor(gesture): simplify SDK payload adapters - #3854

Draft
thymikee wants to merge 1 commit into
mainfrom
refactor/gesture-sdk-simplify
Draft

thymikee wants to merge 1 commit into
mainfrom
refactor/gesture-sdk-simplify

Conversation

@thymikee

@thymikee thymikee commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

Simplify gesture SDK adapters: derive drag, tap, and swipe-preset options from existing payload types, inline helpers that only add kind, share pan/transform coordinate projection, and keep center validation beside its caller.

Two files, 39 fewer production lines. Public signatures, wire payloads, field precedence, and errors are preserved. No new files or dependencies. SDK-only scope; native executors and daemon dispatch are unchanged. Follow-up to #3852; no linked issue.

Validation

  • Head: 34a33e84cc9901cfd9729c36c93af1c8fa8aca85. Independent review: no findings.
  • CI passed, including coverage, repository guards, packaging, and all 201 provider integration tests across 65 files. Draft-only Apple/Android/Linux smoke jobs were skipped.
  • Size report: unpacked package −361 B; download −11 B.
  • Local pnpm check:affected --run --head 34a33e84cc9901cfd9729c36c93af1c8fa8aca85 failed (run-vK9A6Z, exactCommit=true): 949 passed; fake record exceeded 20 seconds at apple-platform-output-guard.test.ts:384. Structural checks passed.
  • Same command on unchanged base f8c60ca188f62e110bdc1d3e6225b134960886c0—pnpm exec vitest related --run --passWithNoTests packages/contracts/src/client-gesture.ts src/agent-device-client.ts—reproduced the identical failure/counts. Isolated checkout removed.
  • Earlier dirty-tree run passed all 950 tests (run-SRBMb9). CI success does not replace the failed local receipt. Draft retained pending resolution of that local blocker; no live-device verification claimed.

View guided diff Turn on auto-fix

@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.48 MB 5.48 MB -361 B
Package (unpacked) 5.48 MB 5.48 MB -361 B
Package (download) 1.66 MB 1.66 MB -11 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 39.9 ms 39.7 ms -0.2 ms
CLI --help 79.4 ms 79.0 ms -0.4 ms

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 34a33e8, and I found no problems in the gesture adapter changes. All 15 checks pass, and the local check:affected timeout in apple-platform-output-guard.test.ts does not overlap with this diff, which touches only client-gesture.ts types and the agent-device-client.ts gesture adapters; the PR body says it reproduces on the unchanged base. There are no conflicts, and nothing else must happen before merge.

Not blocking: there is no SDK-level test that calls transformGesture and asserts its structured gesture input, unlike pan, drag, tap and rotate; a test beside the one for pan in src/tests/agent-device-client.test.ts, expecting kind transform, origin, delta, scale, degrees and durationMs, would catch a wrong kind or projection, and you can take or leave it.

I read the payload types to check that they match, but I did not run tsc or the tests. I did not re-run the local failure, and I did not search external consumers of the exported DragOptions, TapGestureOptions and SwipeGestureOptions; their names and shapes look unchanged by inspection.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant