Add device row history commands

This commit is contained in:
2026-07-23 22:09:53 +02:00
parent e4c7cf06e9
commit bd5f4f925f
14 changed files with 1109 additions and 13 deletions
+7 -3
View File
@@ -23,9 +23,13 @@ concurrency checks.
- executes the eligible inverse or forward command as a new auditable
revision
The public dispatcher currently supports `circuit.update` and
`circuit-device-row.update`, both with schema version `1`. Other command types
are rejected. The editor does not consume these endpoints yet.
The public dispatcher currently supports `circuit.update`,
`circuit-device-row.update`, `circuit-device-row.insert` and
`circuit-device-row.delete`, all with schema version `1`. Other command types
are rejected. Insert commands contain the complete row with its stable id;
delete commands identify the row and its expected circuit. This makes deletion
undoable without generating a replacement identity. The editor does not
consume these endpoints yet.
Example:
+8 -4
View File
@@ -78,10 +78,14 @@ persistente Undo-/Redo-Stacks verwalten die zulässige LIFO-Reihenfolge und
verwerfen den Redo-Zweig bei einem neuen Benutzerkommando. Ihr Status ist über
`GET /api/projects/:projectId/history` lesbar. Ein zentraler Dispatcher führt
die unterstützten Typen `circuit.update` und `circuit-device-row.update` über
öffentliche Command-, Undo- und Redo-Endpunkte aus. Das Grid verwendet diese
Endpunkte noch nicht; seine sichtbare Historie bleibt daher sitzungslokal.
Struktur-, Synchronisierungs- und Löschoperationen müssen vor der
Frontend-Umstellung ebenfalls als persistente Commands modelliert werden.
öffentliche Command-, Undo- und Redo-Endpunkte aus. Zusätzlich sind
`circuit-device-row.insert` und `circuit-device-row.delete` als atomare
Strukturkommandos vorhanden. Beim Löschen wird die vollständige Zeile im
inversen Kommando gesichert, sodass Undo dieselbe UUID und alle Fachwerte
wiederherstellt. Das Grid verwendet diese Endpunkte noch nicht; seine sichtbare
Historie bleibt daher sitzungslokal. Die übrigen Struktur-, Synchronisierungs-
und Löschoperationen müssen vor der Frontend-Umstellung ebenfalls als
persistente Commands modelliert werden.
## Projektgeräte
@@ -173,12 +173,15 @@ Completed foundation:
to SQLite
- public command, undo and redo endpoints require an expected revision; undo
and redo reconstruct the eligible persisted inverse or forward command
- `circuit-device-row.insert` and `circuit-device-row.delete` preserve stable
row ids, complete deleted-row snapshots and circuit reserve state through
atomic insert/delete, revision and stack transitions
Remaining constraints before completing persistent history:
- extend the concrete project-scoped command union and executors beyond the
internal Circuit and CircuitDeviceRow update slices; the generic versioned
command envelope is complete
Circuit field and CircuitDeviceRow field/insert/delete slices; the generic
versioned command envelope is complete
- route the remaining structural, synchronization and destructive domain
writes through the shared command, revision and stack transaction boundary
- replace the session-local frontend command stack only after server-side
@@ -390,6 +390,9 @@ Implemented foundation:
- a central application dispatcher reconstructs persisted commands and exposes
optimistic command, undo and redo endpoints for Circuit and CircuitDeviceRow
field updates
- typed CircuitDeviceRow insert/delete commands preserve complete row snapshots
and stable ids; row mutation, circuit reserve state, revision and history
stack transition commit or roll back together
- revision metadata, change-set payloads and the project counter are committed
in one SQLite transaction
- a stale expected revision produces no history writes