gum-tool-undo

Guide developers in resolving Gum undo/redo issues with snapshot tracking and lock handling.

597|79|Updated Mar 11, 2015
One-click install
npx skills add https://github.com/vchelaru/Gum --skill gum-tool-undo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gum-tool-undo
Source: https://github.com/vchelaru/Gum/tree/main/.claude/skills/gum-tool-undo
Command: npx skills add https://github.com/vchelaru/Gum --skill gum-tool-undo

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about gum-tool-undo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does undo and redo work in the Gum UI tool?

Gum's undo system uses deep-clone snapshots to capture element and behavior states, maintaining per-element history stacks for Screens, Components, and StandardElements to ensure accurate reverts without cross-element interference.

How do I properly use UndoLock to record state changes in Gum?

To record state changes in Gum, use the RequestLock() method to automatically handle RecordState() and RecordUndo() operations, avoiding manual errors and ensuring changes are properly tracked in the history tab.

Why do I get stale object references after performing an undo operation in Gum?

Stale object references after undo operations in Gum occur because the snapshot-based system replaces object states, requiring developers to mitigate references to old objects that no longer reflect the reverted element state.

Can I undo changes across multiple elements globally in Gum?

No, Gum lacks global undo functionality; each element maintains its own independent undo history stack, meaning cross-element changes cannot be reverted in a single operation.

Does Gum's undo history persist after closing the application?

No, Gum's undo history is not persistent; closing the application clears all undo and redo stacks, meaning developers cannot revert changes made in previous sessions.

What are the limitations of Gum's snapshot-based undo system?

Gum's undo system lacks persistence, global undo across elements, and complete behavior-related undo coverage, requiring developers to design workarounds for missing selection restoration and behavior gaps.