mattcasters opened a new pull request, #8042: URL: https://github.com/apache/hop/pull/8042
## What Replace incremental `ChangeAction` replay 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 + `nextAlso` chaining). It restores the previous or next snapshot into the existing `PipelineMeta` / `WorkflowMeta` object. This is the same approach that made undo/redo reliable in hop-data-vault modelers. ## Why The old system was error-prone: - Replay depends on indexes, clones, hop endpoint names, and `nextAlso`. - Combined transform+note moves could desync because `addUndoPosition` dropped `nextAlso`. - Workflow redo of an action edit hit `ChangeTransform` instead of `ChangeAction`. - Transform dialogs only recorded undo when a clone/XML compare said so, so missed edits were neither undone nor marked dirty. `PipelineMeta.clone()` already tells callers to serialize to XML. Snapshots use that path (`XmlMetadataUtil`, no license header / formatter). ## How - New `XmlSnapshotUndo` stores gzip XML stacks, trimmed to `PropsUi.getMaxUndo()` (default 100). - Pipeline and workflow graphs own the stacks and restore into the live meta without firing file-load extension points. - Dialogs, paste, drag, snap/align, and notes snapshot **before** the mutation (one undo step for compound actions). - Leftover `hopGui.undoDelegate.addUndo*` calls still work through a post-change shim (plugins included). - After undo/redo, the dirty asterisk follows whether the current snapshot matches the last saved one. - **TableView** cell undo is unchanged. ## GUI Configuration perspective → Explorer Perspective: **Maximum undo operations** (`PropsUi.getMaxUndo()`). CLI: `--max-undo`. ## Tests `XmlSnapshotUndoTest` covers pipeline/workflow round-trip, redo clearing, max-undo trim, apply-without-recording, and gzip content equality. ## Issue Fixes #8037 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
