Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix(delete): keep the open project's recordings, which the preview holds
EtienneLescot6539cb09f858
diff --git a/src/components/ai-edition/Modals.tsx b/src/components/ai-edition/Modals.tsxindex 41cd79d98..f83510433 100644--- a/src/components/ai-edition/Modals.tsx+++ b/src/components/ai-edition/Modals.tsx@@ -167,7 +167,9 @@ export function OpenProjectModal({setRecordings(null);setTrashRecordings(false);setTrashFailed(false);- if (!id) return;+ // The open project's take is held by the preview: Windows refuses to move it, after its+ // sidecars are already gone. Its recordings are kept, and the row says so.+ if (!id || id === activeProjectId) return;void loadRecordings(id).then((result) => {if (armedIdRef.current === id && result.success) setRecordings(result);diff --git a/src/components/ai-edition/OpenProjectModal.test.tsx b/src/components/ai-edition/OpenProjectModal.test.tsxindex f9717ab2f..16b345ec2 100644--- a/src/components/ai-edition/OpenProjectModal.test.tsx+++ b/src/components/ai-edition/OpenProjectModal.test.tsx@@ -33,6 +33,7 @@ function renderModal(onSelect?: () => void;onDelete?: (...args: unknown[]) => Promise<{ trashFailed?: boolean } | undefined>;recordings?: AiEditionProjectRecordingsResult;+ activeProjectId?: string | null;} = {},) {const onSelect = overrides.onSelect ?? vi.fn();@@ -43,7 +44,7 @@ function renderModal(open={true}onClose={vi.fn()}projects={projects}- activeProjectId={null}+ activeProjectId={overrides.activeProjectId ?? null}onSelect={onSelect}onDelete={onDelete}loadRecordings={loadRecordings}@@ -103,6 +104,20 @@ describe("OpenProjectModal delete", () => {await waitFor(() => expect(onDelete).toHaveBeenCalledWith("proj_one", "trash"));});+ it("keeps the open project's recordings, which the preview holds", () => {+ const { onDelete, loadRecordings } = renderModal({+ recordings: ownRecordings,+ activeProjectId: "proj_one",+ });++ fireEvent.click(screen.getAllByRole("button", { name: /delete project/i })[0]);+ expect(loadRecordings).not.toHaveBeenCalled();+ expect(screen.getByText(/recordings are kept/i)).toBeInTheDocument();+ fireEvent.click(screen.getByRole("button", { name: /^delete$/i }));++ expect(onDelete).toHaveBeenCalledWith("proj_one", "keep");+ });+it("says Recycle Bin on Windows", async () => {platform.current = "win32";renderModal({ recordings: ownRecordings });diff --git a/technical-documentation/testing/manual-e2e-checklist.md b/technical-documentation/testing/manual-e2e-checklist.mdindex ce77a7894..42091c84f 100644--- a/technical-documentation/testing/manual-e2e-checklist.md+++ b/technical-documentation/testing/manual-e2e-checklist.md@@ -829,6 +829,7 @@ The mask comes from the native compositor (ONNX Runtime + the vendored selfie-se- [ ] Record again, delete with the switch **on**, and confirm the screen recording (`.mp4`, or `.webm` from the browser recorder), its `.cursor.json`, its `.session.json` and any `-webcam` file are in the system Trash and can be restored from there.- [ ] Add one recording to two projects, delete one of them with the switch on, and confirm the row says the recording is kept for the other project by name, and that the other project still opens with its media.- [ ] Import a video from outside the recordings folder into a project, delete it, and confirm the dialog offers no switch and the file is untouched.+- [ ] Delete the project that is open in the editor, and confirm its row offers no switch and says the recordings are kept: the preview holds the take open, which Windows will not move.### Editor window bounds — post-1.10.0