refactor(editor): extract export start settings#567
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)
📝 WalkthroughWalkthroughThe PR extracts export settings initialization logic from ChangesExport Settings Resolution
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 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
Extracts the export-start settings builder from
VideoEditor.tsxinto a small pure module,exportStartSettings.ts.Motivation
VideoEditor.tsxshould coordinate user intent, not own every export request-building detail. This slice moves the dropdown-to-ExportSettingsmapping into a focused, tested function while preserving existing MP4/GIF settings behavior.Type of Change
Related Issue(s)
None.
Changes Made
resolveExportStartSettingsfor constructingExportSettingsfrom dropdown state and source dimensions.calculateOutputDimensionsandGIF_SIZE_PRESETS.VideoEditor.tsxto call the resolver when starting an export from the dropdown.Scope Note
This PR does not change export execution, export routing, native/NVIDIA behavior, save/finalize behavior, UI copy, project persistence, or packaged build settings. It only extracts the existing dropdown settings construction into a tested pure function.
Testing Guide
Checklist
mainLocal Checks
npm test -- src/components/video-editor/exportStartSettings.test.ts src/components/video-editor/exportStatusModel.test.ts src/components/video-editor/mp4ExportSettings.test.ts src/components/video-editor/mp4ExportRouting.test.ts src/components/video-editor/useNvidiaCudaExportOptIn.test.tsnpx tsc --noEmit --pretty falsenpx biome check --formatter-enabled=false src/components/video-editor/VideoEditor.tsx src/components/video-editor/exportStartSettings.ts src/components/video-editor/exportStartSettings.test.tsgit diff --checkRuntime/Repro Evidence
Not run. This is a pure settings-construction extraction with no exporter/native/runtime path changes.
Summary by CodeRabbit
Bug Fixes
Tests