What problem does it solve?
Provides a concise reference for Gum's undo/redo mechanism, helping developers understand its limitations, scope, and how to avoid common pitfalls such as stale references and missing selection restoration.
Core Features & Use Cases
- Per‑element undo history: Each element (Screen, Component, StandardElement) maintains its own stack, preventing cross‑element interference.
- Snapshot‑based recording: Uses deep‑clone snapshots to capture element and behavior states, ensuring accurate revert operations.
- Correct lock pattern: Shows the proper use of
RequestLock() to automatically handle RecordState() and RecordUndo(), avoiding manual errors.
- Limitations awareness: Highlights lack of persistence, no global undo, and behavior‑related undo gaps, guiding developers to design workarounds.
Quick Start
Ask the gum‑tool‑undo skill to explain how to correctly use UndoLock for recording changes.