TableTower/tests
RobinFiredrake ff7c2023c2 Undo and redo for every Build edit
EditHistory (ui/edit_history.gd) keeps an undo and a redo stack of
whole-board snapshots per collection. Each table and group is its own
JSON string, shared with the previous snapshot when unchanged, so a step
costs about the size of the cards it changed. Collapsed flags are kept
apart: collapsing isn't a step and undo leaves it as it is. Labels come
from diffing the snapshots ("Delete table Loot", "Add pipe Loot → Gems",
"Move 3 cards", "Group Careers"), or from the caller.

Main.mark_dirty records steps: typing commits when it pauses (0.8 s) and
merges until focus moves, other edits commit at the end of the frame (a
drag is one step), and quick edits to the same card or pipe merge.
Actions in main.gd bracket their changes with _begin_edit/_end_edit.
Undo patches only the changed tables and groups in place and rebuilds
their cards, keeping view, mode, search and lit results, then flashes
what changed. Ctrl+Z, Ctrl+Shift+Z / Ctrl+Y outside text fields (Play
too), Undo/Redo buttons with step tooltips in the Build bar, and the
toast's Undo now goes through the history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:00:47 -06:00
..
test_board_tester.gd Test board: BoardTester class, Build-mode dialog, README section 2026-11-08 17:49:35 -06:00
test_board_tester.gd.uid Test board: BoardTester class, Build-mode dialog, README section 2026-11-08 17:49:35 -06:00
test_choice_dialog.gd Choice pop-up: minimize pill, option preview panel, reusable TablePreview 2026-11-08 16:39:56 -06:00
test_choice_dialog.gd.uid Choice pop-up: minimize pill, option preview panel, reusable TablePreview 2026-11-08 16:39:56 -06:00
test_expr_if.gd Add if(condition, then, else) and refuse the broken inline ternary 2026-11-08 14:20:05 -06:00
test_expr_if.gd.uid Add if(condition, then, else) and refuse the broken inline ternary 2026-11-08 14:20:05 -06:00
test_fast_roll.gd Add fast roll: Shift-click a die to skip the animation 2026-11-08 12:53:39 -06:00
test_fast_roll.gd.uid Add fast roll: Shift-click a die to skip the animation 2026-11-08 12:53:39 -06:00
test_groups.gd Big-board navigation: search, focus_table, minimap, pack, lazy cards 2026-11-08 18:16:32 -06:00
test_groups.gd.uid Group cards and templates 2026-11-08 17:01:34 -06:00
test_integration.gd Logic cards engine: expressions, effects, choice/loop/variable/sheet cards, coroutine roller 2026-11-08 13:38:42 -06:00
test_integration.gd.uid Roller: expand refs and variables through RollContext, save pipe results 2026-11-08 12:26:33 -06:00
test_io.gd Add import/export converters: JSON, JSON Canvas, Mermaid, DOT, GraphML 2026-11-08 12:14:56 -06:00
test_io.gd.uid Add import/export converters: JSON, JSON Canvas, Mermaid, DOT, GraphML 2026-11-08 12:14:56 -06:00
test_logic.gd Logic cards engine: expressions, effects, choice/loop/variable/sheet cards, coroutine roller 2026-11-08 13:38:42 -06:00
test_logic.gd.uid Logic cards engine: expressions, effects, choice/loop/variable/sheet cards, coroutine roller 2026-11-08 13:38:42 -06:00
test_logic_ui.gd Logic cards UI: choice pop-up, card kinds, Build creation and settings, tray 2026-11-08 14:07:57 -06:00
test_logic_ui.gd.uid Logic cards UI: choice pop-up, card kinds, Build creation and settings, tray 2026-11-08 14:07:57 -06:00
test_model.gd Add weights, dice expressions, pipe options, card mode and cycle check to the model 2026-11-08 12:11:43 -06:00
test_model.gd.uid Add weights, dice expressions, pipe options, card mode and cycle check to the model 2026-11-08 12:11:43 -06:00
test_navigation.gd Big-board navigation: search, focus_table, minimap, pack, lazy cards 2026-11-08 18:16:32 -06:00
test_navigation.gd.uid Big-board navigation: search, focus_table, minimap, pack, lazy cards 2026-11-08 18:16:32 -06:00
test_roller.gd Logic cards engine: expressions, effects, choice/loop/variable/sheet cards, coroutine roller 2026-11-08 13:38:42 -06:00
test_roller.gd.uid Build the pipe-board app in Godot 2026-11-08 12:05:41 -06:00
test_router.gd Conditional pipes and router cards 2026-11-08 17:53:00 -06:00
test_router.gd.uid Conditional pipes and router cards 2026-11-08 17:53:00 -06:00
test_shell.gd Add app-shell UI: table settings, collection switcher, import/export, endless-loop chip 2026-11-08 12:23:21 -06:00
test_shell.gd.uid Add app-shell UI: table settings, collection switcher, import/export, endless-loop chip 2026-11-08 12:23:21 -06:00
test_simulate.gd Test board: BoardTester class, Build-mode dialog, README section 2026-11-08 17:49:35 -06:00
test_simulate.gd.uid Add a headless board simulator tool and its test 2026-11-08 14:15:21 -06:00
test_storage.gd Add collection storage: LibraryStore, StateStore, format version 2 2026-11-08 12:11:26 -06:00
test_storage.gd.uid Add collection storage: LibraryStore, StateStore, format version 2 2026-11-08 12:11:26 -06:00
test_templates.gd Group cards and templates 2026-11-08 17:01:34 -06:00
test_templates.gd.uid Group cards and templates 2026-11-08 17:01:34 -06:00
test_text.gd Add RollContext, TextExpander and Formatter for inline references and BBCode 2026-11-08 12:13:25 -06:00
test_text.gd.uid Add RollContext, TextExpander and Formatter for inline references and BBCode 2026-11-08 12:13:25 -06:00
test_undo.gd Undo and redo for every Build edit 2026-11-08 19:00:47 -06:00
test_undo.gd.uid Undo and redo for every Build edit 2026-11-08 19:00:47 -06:00