feat(export): add NVIDIA opt-in detection#562
Conversation
📝 WalkthroughWalkthroughAdds an experimental NVIDIA CUDA native export path with user opt‑in, runtime capability probing via getNativeExportCapabilities(), refactors GPU probe behavior, updates skip‑reason/timeout logic, wires IPC/preload/exporter/UI, and adds tests. ChangesNVIDIA CUDA Export Capability with User Opt-In
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 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)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/video-editor/VideoEditor.tsx`:
- Around line 631-649: The effect that calls
window.electronAPI?.getNativeExportCapabilities?() must catch promise rejections
so an error doesn't become an unhandled rejection and so the UI falls back to a
deterministic state; update the useEffect (the async then handler around
getNativeExportCapabilities) to add a .catch handler (or use try/catch inside an
async IIFE) that treats any error as available = false, calls
setNvidiaCudaExportAvailable(false), resets
setExperimentalNvidiaCudaExportState(false) if needed, and optionally logs the
error, while still respecting the cancelled flag before updating state.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a0ac908c-7ed9-4d86-a974-c70e3de02089
📒 Files selected for processing (9)
electron/electron-env.d.tselectron/ipc/export/native-video.test.tselectron/ipc/export/native-video.tselectron/ipc/register/export.tselectron/preload.tssrc/components/video-editor/ExportSettingsMenu.tsxsrc/components/video-editor/VideoEditor.tsxsrc/lib/exporter/modernVideoExporter.tssrc/lib/exporter/types.ts
Summary
RECORDLY_EXPERIMENTAL_NVIDIA_CUDA_EXPORT=1.Why
This carries forward the NVIDIA research from #504 without merging the broad draft branch. Users should not silently enter an experimental CUDA path just because the app is packaged; the app should detect the device, show an explicit opt-in, and continue to rely on the existing validation/fallback chain.
Platform Scope
.exeand the export route still falls back through the Windows GPU compositor.References Checked
app.getGPUInfo('basic')for vendor/device detection: https://www.electronjs.org/docs/latest/api/app#appgetgpuinfoinfotypeSafety Notes
Verification
npm test -- electron/ipc/export/native-video.test.tsnpm test -- src/lib/exporter/modernVideoExporter.nativeStaticLayout.test.tsnpx tsc --noEmitnpx biome check --formatter-enabled=false electron/ipc/export/native-video.ts electron/ipc/export/native-video.test.ts electron/ipc/register/export.ts electron/preload.ts electron/electron-env.d.ts src/lib/exporter/types.ts src/lib/exporter/modernVideoExporter.ts src/components/video-editor/ExportSettingsMenu.tsx src/components/video-editor/VideoEditor.tsxgit diff --checknpx vite build --config vite.config.tsnpm run smoke:electron-main-cjsNot Run
npm run smoke:packaged-binariesbecause this checkout does not currently have a packagedrelease/app.asar.unpackeddirectory.Related to #504.