TLDR Web Dev · ARTICLES & TUTORIALS

IMPLEMENTING AN UNDO/REDO SYSTEM IN A COMPLEX VISUAL APPLICATION

mlacast.com25 min read

Summary from the TLDR Web Dev newsletter

This article goes over the design and implementation of a context-aware undo/redo system for Alkemion Studio, a complex visual application for TTRPGs. The main challenge was handling user interactions across multiple contexts, requiring a system that prevents undoing actions outside the user's current view to avoid confusion and data loss. The solution involves Action Classes with undo/redo functions, organized into Action Volumes managed by a central ActionStore singleton, and using a global Action Context to determine valid actions.