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(editor): point the modal-guard test at the module that still exports pushHistory
EtienneLescot3edc5d2cfd33
diff --git a/src/lib/ai-edition/store/undo.modalGuard.test.tsx b/src/lib/ai-edition/store/undo.modalGuard.test.tsxindex ef7066c27..f54b12389 100644--- a/src/lib/ai-edition/store/undo.modalGuard.test.tsx+++ b/src/lib/ai-edition/store/undo.modalGuard.test.tsx@@ -10,7 +10,8 @@ import { cleanup, fireEvent, render } from "@testing-library/react";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import { type AxcutDocument, axcutSchemaVersion } from "../schema";import { useProjectStore } from "./projectStore";-import { clearHistory, pushHistory, useUndoRedoShortcuts } from "./undo";+import { clearHistory, useUndoRedoShortcuts } from "./undo";+import { pushHistory } from "./undoStack";function doc(title: string): AxcutDocument {return {diff --git a/src/lib/ai-edition/store/undoStack.ts b/src/lib/ai-edition/store/undoStack.tsindex 6f28bc197..be56a89cc 100644--- a/src/lib/ai-edition/store/undoStack.ts+++ b/src/lib/ai-edition/store/undoStack.ts@@ -11,7 +11,11 @@//// This module deliberately imports nothing from the store, so `projectStore ->// undoStack` is a leaf edge and there is no cycle to reason about. `undo.ts`-// re-exports `pushHistory` / `clearHistory` from here for existing callers.+// re-exports `clearHistory` from here for existing callers; `pushHistory` is NOT+// re-exported -- import it from this module directly. Keeping it off `undo.ts`+// keeps the audit in `documentWriteAudit.test.ts` honest: `recordHistory` in+// `projectStore` is its only production caller, and a second import path would+// be a second way to record history without saying so at the call site.export type Snapshot = { projectId: string; doc: unknown };