refactor(editor): extract NVIDIA export opt-in hook#563
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 NVIDIA CUDA export opt-in logic from ChangesNVIDIA CUDA Export Opt-in Hook Extraction
Possibly related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 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
Extract the NVIDIA CUDA export opt-in runtime state from
VideoEditor.tsxinto a focuseduseNvidiaCudaExportOptInhook.Motivation
VideoEditor.tsxshould not own device capability probing, app-local opt-in persistence, and the toggle enable guard inline. This keeps the editor component closer to UI/export orchestration while the hook owns the native capability side effect boundary introduced by #562.Type of Change
Related Issue(s)
Changes Made
src/components/video-editor/useNvidiaCudaExportOptIn.tsfor NVIDIA CUDA availability probing, local setting persistence, and opt-in gating.VideoEditor.tsxstate/effect/callback block with the hook return values.Scope Note
Testing Guide
Checklist
Local Checks
npm test -- src/components/video-editor/useNvidiaCudaExportOptIn.test.tsnpm test -- electron/ipc/export/native-video.test.tsnpm test -- src/lib/exporter/modernVideoExporter.nativeStaticLayout.test.tsnpx tsc --noEmit --pretty falsenpx biome check --formatter-enabled=false src/components/video-editor/VideoEditor.tsx src/components/video-editor/useNvidiaCudaExportOptIn.ts src/components/video-editor/useNvidiaCudaExportOptIn.test.tsgit diff --checkRuntime/Repro Evidence
Not run. This is a renderer hook extraction with no native/preload/IPC contract change. Hardware runtime behavior remains covered by the #562 validation path and should be smoke-tested on Windows NVIDIA before any release claim.
Summary by CodeRabbit
Refactor
Tests