Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9debf39576
ℹ️ 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".
| let scaledTransform = sourceVideoTrack.preferredTransform.concatenating( | ||
| CGAffineTransform(scaleX: scale, y: scale) | ||
| ) |
There was a problem hiding this comment.
Scale translation when resizing transformed recordings
When a source track has a non-identity preferredTransform (common for landscape/rotated iOS simulator videos), composing sourceVideoTrack.preferredTransform.concatenating(CGAffineTransform(scaleX:y:)) scales the picture but leaves the transform’s translation terms in the original coordinate space, so frames are shifted outside the smaller renderSize and the resized output is cropped/partially blank. This only appears for transformed inputs, but it breaks the new --quality path in those recordings; apply scaling in the correct transform order (or scale tx/ty explicitly) so translation matches the resized canvas.
Useful? React with 👍 / 👎.
Summary
Add explicit
record start --quality <5-10>support without changing recording defaults. Omittingqualitypreserves the existing platform-native recording path, and explicitquality: 10is treated as native/no resize.How It Works
adb shell wm size, prefers override dimensions when present, computes even scaled dimensions, and startsadb shell screenrecord --size <width>x<height>. FPS is unchanged.qualityto the XCTest runner. The runner scales captured frame dimensions before encoding, while keeping FPS behavior unchanged.simctl recordVideodoes not expose a resolution setting, so recording starts the same way as before. On stop, quality 5-9 runs the bundledrecording-resize.swifthelper to resize the MP4 before the existing telemetry/overlay finalization continues. Quality 10 skips this pass.record stopreturns anoverlayWarning, matching the existing best-effort finalization style.Environment / Tooling
No new package or system-tool installation is required for this feature.
adbrequirement already needed for Android recording.xcrun,simctl, and Swift viaxcrun swift). The resize helper is checked into the repo and invoked from the existing recording post-processing path.In short: users only need the same platform tools they already needed for recording on the target platform.
Validation
pnpm formatpnpm exec vitest run src/utils/__tests__/args.test.ts src/daemon/handlers/__tests__/record-trace.test.ts src/daemon/handlers/__tests__/session-replay-script.test.ts src/daemon/__tests__/session-store.test.ts src/platforms/ios/__tests__/runner-client.test.ts src/platforms/ios/__tests__/recording-scripts.test.tspnpm check:quickpnpm build:xcuitestpnpm test:smokegit diff --checkKnown validation note:
pnpm check:unitstill exits-1insidevitest runafter fixture stdout and without assertion failure details; the targeted affected Vitest suites and smoke tests pass.