Add persistent history stacks

This commit is contained in:
2026-07-23 21:48:24 +02:00
parent 2d0aa11d9c
commit 1e4dd26bb8
24 changed files with 2294 additions and 15 deletions
@@ -18,6 +18,7 @@ import {
toCircuitPatchValues,
type CircuitPatchPersistenceInput,
} from "./circuit.persistence.js";
import { applyProjectHistoryTransition } from "./project-history.persistence.js";
import { appendProjectRevision } from "./project-revision.persistence.js";
type CircuitRow = typeof circuits.$inferSelect;
@@ -96,6 +97,12 @@ export class CircuitProjectCommandRepository
forward: input.command,
inverse,
});
applyProjectHistoryTransition(tx, {
projectId: input.projectId,
source: input.source,
recordedChangeSetId: revision.changeSetId,
targetChangeSetId: input.historyTargetChangeSetId,
});
return { revision, inverse };
});