mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-15 01:05:13 -05:00
Fixes graph desync issues where edge deletions don't persist, causing stale connections that users cannot remove. Frontend changes: - edgeStore: Validate links during addLinks() - skip edges referencing non-existent nodes - edgeStore: Filter invalid edges in getBackendLinks() before save - useSaveGraph: Sync edge store with authoritative backend state after save to prevent desync Backend changes: - graph.py: Add prune_invalid_links() method that removes: - Links referencing non-existent nodes - Links with invalid block IDs - Called during graph validation to auto-cleanup orphan edges This ensures: 1. Invalid edges are filtered out when loading a graph 2. Invalid edges are not sent to backend during save 3. Frontend syncs with backend state after save 4. Backend cleans up any orphan edges that slip through Closes: SECRT-1959