fix(recording): keep cursor telemetry for the screen recording when a webcam companion is stored - #1039
Conversation
… webcam companion is stored The webcam companion is stored before the screen recording, and both went through finalizeStoredVideo(), which persists and then clears the pending cursor telemetry. The webcam file got the telemetry and the screen recording got none, so auto-zoom and cursor effects were empty in the editor. Webcam companions are now only written and validated. Fixes webadderallorg#1038 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: webadderallorg/Recordly/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe recording storage handler now detects webcam companion paths and returns those videos after validation without finalizing them. Other recordings continue through the existing finalization flow. ChangesWebcam Companion Recording Storage
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to Webcam companions are validated without consuming pending cursor samples, while screen recordings retain cursor-sidecar creation. No concrete merge-blocking risk is evident. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Filename restrictions and video validation remain in place. A failed screen save can, however, leave a locally stored webcam capture unlinked to a visible recording. The reviewed change does not show a broader access or deployment change. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
Description
Keep the session's cursor telemetry for the screen recording when a webcam companion file is stored.
electron/ipc/recording/storagePath.ts: addisWebcamCompanionRecordingPath(), which matchesrecording-<digits>-webcam.(webm|mp4), the same namingresolveRecordedVideoStoragePathalready accepts.store-recorded-video(electron/ipc/register/recording.ts): for webcam companions, write and validate the file, then return{ success, path }without running the screen-recording finalization (cursor telemetry persist, current video/project state, auto-recording prune).Motivation
With the webcam enabled, the renderer stores the webcam companion (
recording-<ts>-webcam.*) before the screen recording. Both went throughfinalizeStoredVideo(), which persists the pending cursor telemetry next to the file and then clears it. The webcam file got the telemetry (…-webcam.mp4.cursor.json), and the screen recording got none, so auto-zoom suggestions and cursor effects were empty in the editor.Type of Change
Related Issue(s)
Fixes #1038
Screenshots / Video
Before: only
recording-<ts>-webcam.mp4.cursor.jsonis written, andgetCursorTelemetry(<screen .webm>)returns 0 samples.After:
recording-<ts>.webm.cursor.jsonis written, and the editor loads its samples (108 in a 10 s test).Testing Guide
recording-<ts>.webm.cursor.jsonshould exist, and the editor should offer cursor effects / "Suggest Zooms from Cursor" for the recording.Automated:
npx vitest --run electron/ipc/recording/storagePath.test.ts: 31 passed (6 new)npx tsc --noEmit: cleannpx biome checkon the changed files: clean (the import-order notice at the top ofregister/recording.tsis pre-existing onmain)Manually verified on Kali Linux (XFCE, X11) with an equivalent change applied to the 1.4.0 build.
Checklist
Investigated with AI assistance (Claude); tested on Kali Linux.
Summary by CodeRabbit
.webmand.mp4formats are now recognized during saving, while ordinary recordings continue through the existing process..movformat are not treated as supported companion recordings.