Add section renumber history
This commit is contained in:
@@ -28,13 +28,14 @@ The public dispatcher currently supports `circuit.update`, `circuit.insert`,
|
||||
`circuit-device-row.insert`, `circuit-device-row.delete` and
|
||||
`circuit-device-row.move` plus
|
||||
`circuit-device-row.move-with-new-circuit` and `circuit.reorder-section`, all
|
||||
with schema version `1`. Other command types are rejected. Insert commands
|
||||
contain the complete entity or circuit block with stable ids; delete commands
|
||||
include the expected parent identity. Circuit snapshots contain zero, one or
|
||||
multiple complete device rows. Move commands contain each row's expected and
|
||||
target circuit plus its exact expected and target sort order. This makes
|
||||
deletion and moves undoable without generating replacement identities or
|
||||
renumbering circuits. The editor does not consume these endpoints yet.
|
||||
with `circuit.renumber-section`, all with schema version `1`. Other command
|
||||
types are rejected. Insert commands contain the complete entity or circuit
|
||||
block with stable ids; delete commands include the expected parent identity.
|
||||
Circuit snapshots contain zero, one or multiple complete device rows. Move
|
||||
commands contain each row's expected and target circuit plus its exact expected
|
||||
and target sort order. This makes deletion and moves undoable without
|
||||
generating replacement identities or renumbering circuits. The editor does not
|
||||
consume these endpoints yet.
|
||||
|
||||
`circuit-device-row.move` targets existing circuits in the same circuit list.
|
||||
`circuit-device-row.move-with-new-circuit` atomically creates exactly one
|
||||
@@ -48,6 +49,13 @@ in the section. Each assignment records the expected and target `sortOrder`.
|
||||
The command and its inverse change no circuit field other than `sortOrder`;
|
||||
equipment identifiers and complete device-row blocks remain unchanged.
|
||||
|
||||
`circuit.renumber-section` is an explicit operation requiring one assignment
|
||||
for every circuit in the section. Assignments contain expected and target
|
||||
equipment identifiers. The store rejects stale values, duplicate targets and
|
||||
targets occupied by other sections, then applies swaps through collision-safe
|
||||
temporary identifiers. Undo restores the exact prior identifiers; sort
|
||||
positions and device rows remain unchanged.
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
|
||||
Reference in New Issue
Block a user