refactor(editor): extract export progress state#568
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 inline export-progress construction into a reusable helper function. A new ChangesExport saving progress helper extraction
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 saving-progress state transition from
VideoEditor.tsxinto a small pure module,exportProgressState.ts.Motivation
VideoEditor.tsxstill owns export orchestration and UI state transitions. This slice moves one pure transition out of the component without touching exporter construction, Electron save APIs, native routing, smoke reports, or UI copy.Type of Change
Related Issue(s)
None.
Changes Made
resolveSavingExportProgressfor deriving the progress state shown while the save dialog/finalize path is active.markExportAsSavingto call the pure transition throughsetExportProgress.Scope Note
This PR does not change export execution, save/finalize behavior, native/NVIDIA routing, smoke export reports, UI copy, project persistence, or packaged build settings. It only extracts the existing saving-progress state transition into a tested pure function.
Testing Guide
Checklist
mainLocal Checks
npm test -- src/components/video-editor/exportProgressState.test.ts src/components/video-editor/exportStatusModel.test.ts src/components/video-editor/exportStartSettings.test.tsnpm test -- src/components/video-editor/exportProgressState.test.ts 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/exportProgressState.ts src/components/video-editor/exportProgressState.test.tsnpx biome check --formatter-enabled=false src/components/video-editor/VideoEditor.tsx src/components/video-editor/exportProgressState.ts src/components/video-editor/exportProgressState.test.ts src/components/video-editor/exportStartSettings.ts src/components/video-editor/exportStatusModel.ts src/components/video-editor/mp4ExportSettings.ts src/components/video-editor/mp4ExportRouting.ts src/components/video-editor/useNvidiaCudaExportOptIn.tsgit diff --checkRuntime/Repro Evidence
Not run. This is a pure progress-state extraction with no exporter/native/save path changes.
Summary by CodeRabbit
Refactor
Tests