Conversation
…ptures on macOS `shouldAutoApplyFreshRecordingZoomsForSource` skipped automatic fresh-recording zooms whenever a source's aspect ratio was below `MIN_FRESH_RECORDING_AUTO_ZOOM_SOURCE_ASPECT_RATIO` (1.2). Windows was already exempted because window capture legitimately produces portrait/near-square sources, but macOS was not — so recording a vertical (portrait) app window on macOS suppressed auto-zoom entirely, and the follow-up effect even stripped any existing auto zoom regions. macOS window capture (ScreenCaptureKit) produces the same portrait sources, and click telemetry is already normalized to the captured window, so aspect ratio is not a valid reason to suppress interaction-based zooms there either. Extend the platform exemption to `darwin` and cover it with tests.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: webadderallorg/Recordly/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe fresh-recording zoom eligibility check now allows macOS captures to bypass the aspect-ratio check, as Windows captures already do. A test covers two portrait macOS capture dimensions. ChangesRecording zoom eligibility
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Portrait macOS recordings can now remain eligible for fresh-recording auto-zoom, with the new dimensions covered by tests. No unresolved merge risk is indicated by the supplied context. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
When recording a portrait (vertical) app window on macOS, the automatic fresh-recording auto-zoom never gets applied — and any auto-generated zoom regions get stripped shortly after.
Root cause
shouldAutoApplyFreshRecordingZoomsForSourceinsrc/components/video-editor/timeline/zoomSuggestionUtils.tsgates fresh-recording auto-zoom on the source aspect ratio being>= MIN_FRESH_RECORDING_AUTO_ZOOM_SOURCE_ASPECT_RATIO(1.2):Windows is already exempted, with the rationale (per the existing comment) that window capture legitimately produces portrait / near-square sources. macOS was not exempted, so any portrait capture (ratio < 1.2) fails the gate:
useFreshRecordingAutoZoomcancels the pending auto-suggest for the recording, andmode === "auto"zoom regions.Result: no auto-zoom on portrait recordings on macOS.
Fix
macOS window capture (ScreenCaptureKit) produces the same portrait sources as Windows, and click telemetry is already normalized to the captured window — so aspect ratio is not a valid reason to suppress interaction-based zooms on macOS. Extend the platform exemption to
darwin.Linux behavior is left unchanged.
Tests
Added unit tests in
zoomSuggestionUtils.test.tsasserting that narrow / portrait sources ondarwin(e.g.936×1028,1080×1920) now returntrue, alongside the existingwin32and platform-less cases.How to reproduce (before this change)
Summary by CodeRabbit