Switch pipeline and workflow undo/redo to XML snapshots, fixes #8037 - #8042
Merged
Conversation
…#8037 Replace incremental ChangeAction replay with gzip-compressed document snapshots so undo/redo restores the whole pipeline or workflow instead of puzzling typed deltas back together. TableView cell undo is unchanged. Add a Maximum undo operations field on the Explorer Perspective options tab that reads and writes PropsUi.getMaxUndo().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replace incremental
ChangeActionreplay for pipelines and workflows with gzip-compressed XML snapshots of the whole document.Undo/redo no longer reconstructs graphs from typed deltas (new/delete/change/position +
nextAlsochaining). It restores the previous or next snapshot into the existingPipelineMeta/WorkflowMetaobject.This is the same approach that made undo/redo reliable in hop-data-vault modelers.
Why
The old system was error-prone:
nextAlso.addUndoPositiondroppednextAlso.ChangeTransforminstead ofChangeAction.PipelineMeta.clone()already tells callers to serialize to XML. Snapshots use that path (XmlMetadataUtil, no license header / formatter).How
XmlSnapshotUndostores gzip XML stacks, trimmed toPropsUi.getMaxUndo()(default 100).hopGui.undoDelegate.addUndo*calls still work through a post-change shim (plugins included).GUI
Configuration perspective → Explorer Perspective: Maximum undo operations (
PropsUi.getMaxUndo()). CLI:--max-undo.Tests
XmlSnapshotUndoTestcovers pipeline/workflow round-trip, redo clearing, max-undo trim, apply-without-recording, and gzip content equality.Issue
Fixes #8037