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
@@ -21,6 +21,7 @@ import {
toCircuitDeviceRowPatchValues,
type CircuitDeviceRowPatchInput,
} from "./circuit-device-row.persistence.js";
import { applyProjectHistoryTransition } from "./project-history.persistence.js";
import { appendProjectRevision } from "./project-revision.persistence.js";
type CircuitDeviceRow = typeof circuitDeviceRows.$inferSelect;
@@ -117,6 +118,12 @@ export class CircuitDeviceRowProjectCommandRepository
forward: appliedForward,
inverse,
});
applyProjectHistoryTransition(tx, {
projectId: input.projectId,
source: input.source,
recordedChangeSetId: revision.changeSetId,
targetChangeSetId: input.historyTargetChangeSetId,
});
return { revision, inverse };
});