Restore editor history after reload

This commit is contained in:
2026-07-25 21:45:58 +02:00
parent c45afd0981
commit 4b47bc2bcc
10 changed files with 275 additions and 423 deletions
+11 -11
View File
@@ -122,14 +122,15 @@ Cross-section device moves show confirmation-required feedback before drop. The
## Undo/Redo
Undo/redo wraps editor operations as command objects and reloads the tree after
each command. Existing Circuit and device-row cell edits plus standalone
insert/delete actions execute persistent project commands; their toolbar
undo/redo calls the project-wide server history. New entities receive stable
UUIDs before insertion, and deletion undo restores those same ids. Device-row
moves and circuit reorders also use persistent project commands. Applying a
sorted view across multiple sections is atomic and occupies one history step.
Explicit renumbering uses a collision-safe persistent project command and one
Editor operations execute persistent project commands and reload the tree after
each command. On initial load and every reload, the editor reads undo/redo
eligibility from the project-wide server history and verifies that tree and
history belong to the same project revision. Undo/redo therefore remains
available after a page refresh. New entities receive stable UUIDs before
insertion, and deletion undo restores those same ids. Device-row moves and
circuit reorders also use persistent project commands. Applying a sorted view
across multiple sections is atomic and occupies one history step. Explicit
renumbering uses a collision-safe persistent project command and one
project-history step.
Covered operations include:
@@ -141,6 +142,5 @@ Covered operations include:
- renumber and identifier update flows
- apply sorted order
Current limitations:
- the visible editor stack is still session-local and is empty after reload
The toolbar currently exposes availability through its Undo/Redo buttons. A
browsable revision timeline and named restore points are separate future work.