Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

chore(schema): finish the four-field removal the fixtures missed

Etienne Lescotd27bdd16b5ed
diff --git a/src/lib/ai-edition/document/migrate.ts b/src/lib/ai-edition/document/migrate.ts
index b9c1e4e33..c1be6efe5 100644
--- a/src/lib/ai-edition/document/migrate.ts
+++ b/src/lib/ai-edition/document/migrate.ts
@@ -228,11 +228,6 @@ export function migrateProjectDataToAxcutDocument(
annotations: migratedAnnotations,
zoomRanges: migratedZoomRanges,
legacyEditor,
- agent: {
- pendingQuestions: [],
- suggestions: [],
- lastAppliedOperations: [],
- },
};
return documentSchema.parse(draft);
diff --git a/src/lib/ai-edition/document/timeline.ts b/src/lib/ai-edition/document/timeline.ts
index b5f3e5521..d8f85a7ac 100644
--- a/src/lib/ai-edition/document/timeline.ts
+++ b/src/lib/ai-edition/document/timeline.ts
@@ -537,8 +537,7 @@ export function duplicateClip(
* clip's Edit modal, the renderer op dispatcher, and the LLM's `setClipRange` tool all
* perform. Extracted here (like `moveClip` / `duplicateClip`) so the recipe lives in one
* place instead of being re-derived per façade, which is what let the three drift apart
- * (stale width, un-clamped pills). Pure; does NOT touch `preview.revision` — a caller that
- * needs a preview refresh bumps it itself, so this stays a plain document→document transform.
+ * (stale width, un-clamped pills). Pure — a plain document→document transform.
*
* Recipe: clamp + order the range, zero the clip's timeline extent so `resequenceClips`
* recomputes its RAW length from the new source window (a raw clip's timeline length equals
@@ -574,7 +573,7 @@ export function setClipSourceRange(
* `setClipSourceRange`) so the recipe lives in one place: a `trim` is a plain filter on the
* source-time cut list; every other kind is a pill (`dropPillById` removes every region that
* renders as the same pill as `id`, per the merge rule). Speed / camera-fullscreen live under
- * `legacyEditor`. An id that matches nothing is a no-op. Pure; does NOT touch `preview.revision`.
+ * `legacyEditor`. An id that matches nothing is a no-op. Pure.
*/
export function removeRegion(document: AxcutDocument, kind: RegionKind, id: string): AxcutDocument {
switch (kind) {
@@ -624,7 +623,7 @@ export function removeRegion(document: AxcutDocument, kind: RegionKind, id: stri
* re-laid back-to-back (`resequenceClips`) and every anchored pill's derived ms is refreshed
* against the new layout (`rederiveRegionMs`) — pills anchored to the removed clip drop out,
* exactly like `setClipSourceRange`. Shared by the store's delete-clip action and the LLM's
- * `removeClip` tool. An unknown `clipId` is a no-op. Pure; does NOT touch `preview.revision`.
+ * `removeClip` tool. An unknown `clipId` is a no-op. Pure.
*/
export function removeClip(document: AxcutDocument, clipId: string): AxcutDocument {
const oldClips = document.timeline.clips;
diff --git a/src/lib/ai-edition/document/transcribe.test.ts b/src/lib/ai-edition/document/transcribe.test.ts
index 53d78e930..b943839eb 100644
--- a/src/lib/ai-edition/document/transcribe.test.ts
+++ b/src/lib/ai-edition/document/transcribe.test.ts
@@ -47,9 +47,6 @@ function makeDoc(): AxcutDocument {
annotations: [],
zoomRanges: [],
legacyEditor: null,
- agent: null,
- preview: { revision: 0, playbackRate: 1 },
- export: null,
};
}
diff --git a/src/lib/ai-edition/store/useTimeline.ts b/src/lib/ai-edition/store/useTimeline.ts
index 48e74fb6d..cf824b787 100644
--- a/src/lib/ai-edition/store/useTimeline.ts
+++ b/src/lib/ai-edition/store/useTimeline.ts
@@ -855,8 +855,8 @@ export function useTimeline() {
// Reorder a clip to a new index, then resequence timeline positions.
// Delegates to the shared document/timeline.ts implementation — the same
// function the agent tool-executor uses for "move_clip" ops — so both
- // paths bump preview.revision consistently instead of maintaining two
- // copies of the splice/resequence logic that could drift.
+ // paths stay in step instead of maintaining two copies of the
+ // splice/resequence logic that could drift.
const moveClip = useCallback(
async (clipId: string, toIndex: number) => {
if (!document) return;