constellation-analyzer/src/stores/workspace
Jan-Henrik Bruhn 09b62c69bd fix: clear graph editor when no document is active
Fixes an issue where nodes from a previous document would persist when
creating a new document after closing all documents.

The problem occurred because:
1. When all documents were closed (activeDocumentId becomes null), the
   graph store wasn't being cleared
2. When a new document was created, stale data from the old document
   could contaminate the new document through race conditions

Changes:
- Clear nodes and edges from graph store when activeDocumentId is null
- Add safeguard to prevent saving stale graph data to newly created
  documents before they've been fully loaded
- Maintain proper state tracking to prevent cross-document contamination

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 16:54:40 +02:00
..
migration.ts Initial commit 2025-10-10 11:15:51 +02:00
persistence.ts Initial commit 2025-10-10 11:15:51 +02:00
types.ts Initial commit 2025-10-10 11:15:51 +02:00
useActiveDocument.ts fix: clear graph editor when no document is active 2025-10-10 16:54:40 +02:00
workspaceIO.ts Initial commit 2025-10-10 11:15:51 +02:00