Skip to content

refactor(ios): consolidate series batching onto the sequence runner command #767

@thymikee

Description

@thymikee

Why

After #764 lands, the codebase has three coexisting iOS in-runner batching mechanisms: tapSeries, dragSeries, and the new generic sequence. The generic command's complexity (cross-language step allowlist, budget chunking, per-step results) only pays for itself if it becomes the single batching mechanism.

There is also a latent watchdog bug in the current tapSeries path: press x y --count 4 --interval-ms 10000 routes to tapSeries (holdMs=0, jitterPx=0), and the runner executes all pauses inside one main-thread gesture block — 30s+ in a single request, with no budget chunking, since #764's chunking applies only to sequence. Migrating onto sequence fixes this for free via chunkRunnerSequenceStepsByBudget.

Finally, the drag step kind in the sequence allowlist currently has zero production callers (only the press series uses sequence, emitting tap/longPress steps). Migrating dragSeries gives it its first real consumer.

What to build

  • Route tapSeries-eligible press series (count > 1, no hold/jitter) through sequence tap steps with pauseMs carrying the interval, so the budget chunker bounds wall-clock per request.
  • Support double-tap series: either add a doubleTap step kind to the allowlist (both ends, mirroring the existing synthesized double-tap path) or document why doubleTap stays on its own path.
  • Route dragSeries through sequence drag steps.
  • Stop sending tapSeries/dragSeries from the daemon; keep the Swift handlers wire-compatible for older daemons, annotated like interactionFrame after perf(ios): fuse scroll frame resolution and drag into one runner command #760.
  • Remove the retired commands from PREFLIGHT_SKIP_ELIGIBLE_RUNNER_COMMANDS (daemon-side set only covers commands this daemon sends) and update the allowlist enumeration in ADR 0005 / docs accordingly.
  • Preserve result-shape compatibility for press/drag series consumers (gesture recording touch frames, timing metadata) or update consumers deliberately.

Acceptance criteria

  • No daemon code path sends tapSeries or dragSeries; runner keeps both for wire compat.
  • press x y --count N --interval-ms M with large N×M splits into budget-bounded sequence chunks (no 30s main-thread watchdog exposure).
  • Double-tap series behavior unchanged from the user's perspective.
  • Gesture recording overlays and timing metadata unchanged for migrated paths.
  • Per-family preflight-skip tests and docs reflect the consolidated allowlist.
  • Existing dispatch/series/runner tests updated; focused coverage for chunked tapSeries-style sequences.

Depends on

Follow-up from the design review of #764.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions