refactor(editor): extract MP4 export routing#564
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR extracts MP4 export routing logic into a dedicated module. A new ChangesMP4 Export Routing Centralization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
Description
Extract the MP4 export route decision from
VideoEditor.tsxinto a small pureresolveMp4ExportRoutingmodule.Motivation
VideoEditor.tsxstill owns too much export orchestration inline. This slice moves the MP4 pipeline/backend/NVIDIA gate decision into a named domain helper so the editor component can assemble export config without embedding routing policy details.Type of Change
Related Issue(s)
Changes Made
src/components/video-editor/mp4ExportRouting.tswith a pureresolveMp4ExportRoutinghelper.VideoEditor.tsxwith the helper result.Scope Note
Testing Guide
smokeUseNativeExport=1still chooses the native-capable smoke route while omitted/false stays WebCodecs.Checklist
Local Checks
npm test -- src/components/video-editor/mp4ExportRouting.test.tsnpm test -- src/components/video-editor/useNvidiaCudaExportOptIn.test.ts src/lib/exporter/modernVideoExporter.nativeStaticLayout.test.tsnpm test -- electron/ipc/export/native-video.test.tsnpx tsc --noEmit --pretty falsenpx biome check --formatter-enabled=false src/components/video-editor/VideoEditor.tsx src/components/video-editor/mp4ExportRouting.ts src/components/video-editor/mp4ExportRouting.test.tsgit diff --checkRuntime/Repro Evidence
Not run. This is a pure renderer-side routing-policy extraction with no native/preload/IPC contract change.
Summary by CodeRabbit
Refactor
Tests