Enable touch overlays by default for recordings#239
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6498a6b8bb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| interactionResult = await interactor.doubleTap(targetX, targetY); | ||
| return; | ||
| } | ||
| if (holdMs > 0) await interactor.longPress(targetX, targetY, holdMs); | ||
| else await interactor.tap(targetX, targetY); | ||
| if (holdMs > 0) interactionResult = await interactor.longPress(targetX, targetY, holdMs); | ||
| else interactionResult = await interactor.tap(targetX, targetY); |
There was a problem hiding this comment.
Preserve first gesture timing in repeated press loop
In the repeated press path, interactionResult is reassigned on each iteration, so for iOS runner-backed presses that do not use tapSeries (for example --count with --hold-ms or --jitter-px) the stored timing becomes the last gesture start. recordTouchVisualizationEvent then uses that single timestamp as the base and expands count/intervalMs, which shifts all synthesized overlay events later than the real touches. Capture the first timing (or per-gesture timings) instead of overwriting it each loop iteration.
Useful? React with 👍 / 👎.
| if (fs.existsSync(bundledNeighborPath)) { | ||
| return bundledNeighborPath; | ||
| } | ||
| return path.resolve(path.dirname(bundledNeighborPath), '../../src/platforms/ios/recording-overlay.swift'); |
There was a problem hiding this comment.
Fix fallback path for iOS overlay Swift script
The fallback in resolveOverlayScriptPath resolves ../../src/platforms/ios/recording-overlay.swift relative to path.dirname(bundledNeighborPath). In dist runtime that directory is under dist/src/platforms/ios, so this computes dist/src/src/platforms/ios/... rather than the project src/platforms/ios/... path. If the adjacent bundled Swift file is absent (the scenario this fallback is meant to handle), touch-overlay export will fail because xcrun swift gets a non-existent script path.
Useful? React with 👍 / 👎.
|
Superseded by #245. |
Summary
This PR adds touch visualization to screen recordings across supported platforms and makes the feature the default recording behavior.
From a user perspective:
record startnow produces videos with touch overlays by default.record start --hide-touchesdisables overlays for a given recording.recordoptions such as--fpsand--hide-touches.API Changes
CLI/API behavior changed in a few concrete ways:
recordmoved from opt-in touch visualization to default-on touch visualization.--show-toucheswas removed in favor of a single opt-out flag:--hide-touches.recordscript serialization and replay now round-trip record-specific flags instead of dropping them.showTouchesin the result payload.Design
The implementation is intentionally split by responsibility:
record-tracehandler into focused helpers to reduce branching and make future maintenance lower-risk.This keeps the user contract simple while preserving the existing session model and cross-platform recording flow.
Validation
pnpm typecheckpnpm test:unitpnpm test:smoke