diff options
Diffstat (limited to 'internal/admin/undo.go')
| -rw-r--r-- | internal/admin/undo.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/admin/undo.go b/internal/admin/undo.go index 0f9744c..98d8d9a 100644 --- a/internal/admin/undo.go +++ b/internal/admin/undo.go @@ -61,6 +61,10 @@ type UndoInfo struct { RedoSize int `json:"redo_size"` } +// UndoStack protects history with a mutex, not live game state. Production +// callers must execute Push/Undo/Redo/Clear within the editor's owner task. +// Undo/Redo and the subsequent rebuildAfterUndo are one task, not separate +// dispatches; migrateRoomIDs is an owner-only callback. type UndoStack struct { mu sync.Mutex dataDir string |
