Skip to content

fix(command-surface): allow batch gesture steps without readinessTimeoutMs - #5302

Merged
thymikee merged 1 commit into
callstack:mainfrom
khoerulrizal:fix/batch-gesture-readiness-timeout
Dec 1, 2026
Merged

thymikee merged 1 commit into
callstack:mainfrom
khoerulrizal:fix/batch-gesture-readiness-timeout

Conversation

@khoerulrizal

@khoerulrizal khoerulrizal commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #5275.

readCommonInput assigned undefined for every common field (including the retired readinessTimeoutMs row), and refuseRetiredInput rejected any own key via Object.hasOwn(record, key). When a batch gesture step was read and then re-read in the gesture daemon writer, that readinessTimeoutMs: undefined key caused INVALID_ARGS.

  • readCommonInput now skips undefined values instead of writing undefined own keys.
  • refuseRetiredInput now only refuses when Object.hasOwn(record, key) && record[key] !== undefined.

Before / after

await client.batch.run({
  steps: [{ command: 'gesture', input: { kind: 'fling', direction: 'up', origin: { x: 10, y: 20 }, distance: 400 } }],
});
  • Before: Throws INVALID_ARGS: Batch step 1 gesture input is invalid: readinessTimeoutMs was removed; add an explicit wait for the target before the interaction.
  • After: Accepted and dispatched. Passing an explicit readinessTimeoutMs (e.g. 5000) is still refused.

Validation

Tested at 6d89210e80:

  • vitest run --project unit-core packages/command-surface/src/__tests__/input-audience.test.ts packages/client/src/__tests__/index-gesture.test.ts: 2 passed (18 tests)
  • oxlint packages/command-surface packages/client --deny-warnings: 0 warnings, 0 errors
  • oxfmt --check on modified files: passed
  • tsc -b tsconfig.typecheck.json: passed

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

View guided diff | Re-trigger cubic

@thymikee

thymikee commented Dec 1, 2026

Copy link
Copy Markdown
Member

Thanks for the fix. No code problems were found at 6d89210.

CI has not run on this commit: the CI, Size, Pull Request Body, Apple, Android and Linux runs are waiting for approval for this fork PR, so the unit, typecheck and lint jobs have not checked the change. Not verified here: tests, typecheck, lint, and a batch gesture step on a live device. A live run is not required, because a static trace shows that the daemon still receives the same request shape on the same route.

Before merge, a maintainer must approve the CI runs, and CI must pass at 6d89210.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Dec 1, 2026
@thymikee
thymikee merged commit 7e6ac6e into callstack:main Dec 1, 2026
17 of 19 checks passed
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.

Batch gesture steps are refused for readinessTimeoutMs

2 participants