Create polished demo videos without editing skills. Mac/Windows/Linux
fix: clear source history on recording load
wiiiii123efe5c45c6e5d
diff --git a/electron/ipc/recording/windows.test.ts b/electron/ipc/recording/windows.test.tsindex 025f5a16..73a1e0c2 100644--- a/electron/ipc/recording/windows.test.ts+++ b/electron/ipc/recording/windows.test.ts@@ -45,6 +45,49 @@ describe("waitForWindowsCaptureStop", () => {expect(proc.kill).not.toHaveBeenCalled();});+ it("resolves the fallback target path when the helper closes cleanly without output path", async () => {+ const proc = new FakeCaptureProcess();+ setWindowsCaptureOutputBuffer("Recording stopped without output path");+ setWindowsCaptureTargetPath("C:\\Recordly\\fallback.mp4");++ const stopped = waitForWindowsCaptureStop(+ proc as unknown as Parameters<typeof waitForWindowsCaptureStop>[0],+ 1000,+ );+ proc.emit("close", 0);++ await expect(stopped).resolves.toBe("C:\\Recordly\\fallback.mp4");+ expect(proc.kill).not.toHaveBeenCalled();+ });++ it("rejects with helper output when the helper exits with a non-zero code", async () => {+ const proc = new FakeCaptureProcess();+ setWindowsCaptureOutputBuffer("Encoder error: insufficient memory");++ const stopped = waitForWindowsCaptureStop(+ proc as unknown as Parameters<typeof waitForWindowsCaptureStop>[0],+ 1000,+ );+ proc.emit("close", 1);++ await expect(stopped).rejects.toThrow("Encoder error: insufficient memory");+ expect(proc.kill).not.toHaveBeenCalled();+ });++ it("rejects when the helper emits an error", async () => {+ const proc = new FakeCaptureProcess();+ const error = new Error("spawn failed");++ const stopped = waitForWindowsCaptureStop(+ proc as unknown as Parameters<typeof waitForWindowsCaptureStop>[0],+ 1000,+ );+ proc.emit("error", error);++ await expect(stopped).rejects.toBe(error);+ expect(proc.kill).not.toHaveBeenCalled();+ });+it("kills the helper and rejects when stop never completes", async () => {const proc = new FakeCaptureProcess();diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsxindex 975f5aea..40d40dd9 100644--- a/src/components/video-editor/VideoEditor.tsx+++ b/src/components/video-editor/VideoEditor.tsx@@ -2088,7 +2088,10 @@ export default function VideoEditor() {nextAudioIdRef.current = 1;nextAnnotationIdRef.current = 1;nextAnnotationZIndexRef.current = 1;- }, []);+ resetEditorHistoryStack(editorHistoryRef.current);+ applyingHistoryRef.current = false;+ syncHistoryButtons();+ }, [syncHistoryButtons]);const handleUploadWebcam = useCallback(async () => {const result = await window.electronAPI.openVideoFilePicker();