fix(recording): finalize native Windows recording without renderer round-trip#20
Merged
Merged
Conversation
…und-trip The Windows native finalize path read the entire on-disk screen recording back into renderer memory (readBinaryFile) and shipped it over IPC to store-recorded-session, which rewrote the same bytes to the same path — a multi-GB transfer with renderer OOM risk on stop, just to attach the webcam sidecar. Generalize the macOS attach handler into a platform-agnostic attach-webcam-to-screen-recording: the screen file stays on disk and the renderer only marshals the small in-memory webcam buffer (empty when the webcam streamed to disk). The macOS path migrates to the same channel. Stop handler already owns telemetry/session/manifest; attach rewrites the manifest with the webcam path. Closes #11 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
is this available in release build? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11 (harvested from archived upstream siddharthvaddem#689).
Problem
finalizeNativeWindowsRecordingread the entire on-disk screen recording back into renderer memory viareadBinaryFile(nativeScreenPath)and shipped those bytes over IPC tostore-recorded-session— which then wrote the same bytes back to the same path (resolveRecordingOutputPath(fileName)resolves to where the native helper already wrote the file). For long recordings that's a multi-GB read + IPC marshal + redundant rewrite, with renderer OOM risk on stop — the exact failure mode siddharthvaddem#687 fixed for the webcam sidecar.The round-trip existed only to attach the webcam sidecar:
stop-native-windows-recordingalready writes cursor telemetry, the session, and the manifest in the main process.Fix
attach-native-mac-webcam-recordinghandler into a platform-agnosticattach-webcam-to-screen-recording(it was always pure disk plumbing; the darwin guard was the only mac-specific part). Error strings made platform-neutral; streamed-webcam rollback behavior unchanged.screenVideoPath+ the small webcam buffer (empty when the webcam streamed to disk per fix(recording): stream native-capture webcam to disk to prevent OOM crash on stop siddharthvaddem/openscreen#687). The screen file never leaves disk.Acceptance criteria (from #11)
readBinaryFile(nativeScreenPath)removed from the renderer finalize pathtsc --noEmit0 errors,biome checkclean,vitest225/225, browser tests 6/6, vite build OK🤖 Generated with Claude Code