fix(recording): recover from fullscreen countdown failures#313
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughPlatform-specific window-restore and show behavior was adjusted for Windows: non-editor windows now trigger the HUD overlay instead of restoring; restore is performed only when minimized, visibility ensured with Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
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 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 the current code and only fix it if needed.
Inline comments:
In `@src/hooks/useScreenRecorder.ts`:
- Around line 1302-1305: The IPC call to
window.electronAPI?.setRecordingState(false) can throw and currently prevents
cleanupCapturedMedia() and stopWebcamRecorder() from running; refactor the block
so setRecording(false) remains (to update UI), then call await
window.electronAPI?.setRecordingState(false) inside a try block and move
cleanupCapturedMedia() and await stopWebcamRecorder() into a finally block so
they always run even if the IPC rejects; refer to setRecording,
setRecordingState, cleanupCapturedMedia, and stopWebcamRecorder to locate and
change the code.
🪄 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
Run ID: c5c152d3-7cf6-42ff-9ced-c991fccc6723
📒 Files selected for processing (3)
electron/main.tselectron/windows.tssrc/hooks/useScreenRecorder.ts
Description
Improves recovery when starting a recording from Windows fullscreen sessions. The patch keeps the countdown window from stealing focus on Windows, explicitly clears the recording-state latch when start-up fails, and restores the HUD through the tray recovery path instead of leaving the app alive but unusable.
Motivation
Issue #241 reports that starting a recording from fullscreen can finish the countdown, fail to begin recording, and then leave the app effectively stuck until it is force-closed.
Type of Change
Related Issue(s)
Testing Guide
node ..\\Recordly\\node_modules\\typescript\\bin\\tsc --noEmitnode ..\\Recordly\\node_modules\\@biomejs\\biome\\bin\\biome lint electron\\main.ts electron\\windows.ts src\\hooks\\useScreenRecorder.tsnpm run build:winshow()path switched focus from the fullscreen target to the countdown overlayshowInactive()kept the fullscreen target focused while leaving the overlay visible on topChecklist
Notes
This stays intentionally narrow and Windows-focused. I validated the countdown focus behavior locally with a minimal Electron fullscreen repro, but I still have not reproduced the exact multi-monitor Chrome setup from the issue report.
Summary by CodeRabbit