constellation-analyzer/docs
Jan-Henrik Bruhn d775cb8863 refactor: migrate undo/redo from per-state to per-document level
Refactors the history system to track complete document state instead of
individual timeline states, making timeline operations fully undoable.

BREAKING CHANGE: History is now per-document instead of per-timeline-state.
Existing undo/redo stacks will be cleared on first load with this change.

Changes:
- historyStore: Track complete document snapshots (timeline + all states + types)
- useDocumentHistory: Simplified to work with document-level operations
- timelineStore: All timeline operations now record history
  - createState, switchToState, deleteState, updateState, duplicateState
- Fixed redo button bug (was mutating Zustand state directly)

New capabilities:
- Undo/redo timeline state creation
- Undo/redo timeline state deletion
- Undo/redo switching between timeline states
- Undo/redo renaming timeline states
- Unified history for all document operations

Technical improvements:
- Proper Zustand state management (no direct mutations)
- Document snapshots include entire timeline structure
- History methods accept currentSnapshot parameter
- Removed TypeScript 'any' types for better type safety

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 22:38:23 +02:00
..
DIRECTIONAL_RELATIONSHIPS_UX_SPEC.md feat: add document naming dialog before creation 2025-10-11 12:03:05 +02:00
IMPLEMENTATION_CHECKLIST.md doc: move some plans around 2025-10-11 22:08:53 +02:00
KEYBOARD_SHORTCUTS.md Initial commit 2025-10-10 11:15:51 +02:00
MULTI_FILE_PLAN.md Initial commit 2025-10-10 11:15:51 +02:00
PERSISTENCE_PLAN.md Initial commit 2025-10-10 11:15:51 +02:00
PROJECT_SUMMARY.md Initial commit 2025-10-10 11:15:51 +02:00
SIDE_PANELS_UX_DESIGN.md feat: side panels for properties and tools 2025-10-10 18:13:18 +02:00
TEMPORAL_ANALYSIS_SUMMARY.md doc: move some plans around 2025-10-11 22:08:53 +02:00
TEMPORAL_QUICK_START.md doc: move some plans around 2025-10-11 22:08:53 +02:00
TEMPORAL_SCENARIO_IMPLEMENTATION_PLAN.md doc: move some plans around 2025-10-11 22:08:53 +02:00
TEMPORAL_SCENARIO_UX_CONCEPT.md doc: move some plans around 2025-10-11 22:08:53 +02:00
UNDO_REDO_IMPLEMENTATION.md refactor: migrate undo/redo from per-state to per-document level 2025-10-11 22:38:23 +02:00
UX_ANALYSIS.md Initial commit 2025-10-10 11:15:51 +02:00
UX_CONCEPT_MULTI_VERSION_GRAPH.md doc: move some plans around 2025-10-11 22:08:53 +02:00
VISUAL_EXAMPLES.md doc: move some plans around 2025-10-11 22:08:53 +02:00
WORKSPACE_PERSISTENCE.md Initial commit 2025-10-10 11:15:51 +02:00