Filter Composition Pipeline
Multiple filters are applied in sequence:1
All Nodes
Start with complete dataset
2
Node Type Filter
Hide specific types (Property, Field, etc.)
3
Namespace Filter
Hide entire namespaces
4
Selection Depth Filter (BFS)
Show only nodes within N hops of selected nodes
5
Edge Type Filter
Hide specific edge types (CONTAINS, etc.)
6
Visible Result
Final set of visible nodes and edges
BFS Algorithm
TheapplyUnifiedFilter method in OverlayFilterService:
Position Synchronization
When nodes are filtered out and back in, their positions must be preserved:1
Before Filter
_syncPositionsToAllNodes() - Copy current positions from graphData to allNodes2
Apply Filter
Rebuild graphData with new filter criteria
3
After Filter
_syncInstancedRenderer() - Restore positions from allNodes to graphDataSingle Filter Path
Edge type filtering should only go throughapplyUnifiedFilter:
Correct
All filtering through single
applyUnifiedFilter callWrong
Adding a separate useEffect that also filters edges (causes race conditions)
Common Pitfalls
Duplicate Filter Paths
Adding a separate useEffect that also filters edges creates race conditions and inconsistent state.Missing Adjacency List Updates
The adjacency list in GraphStateManager must be rebuilt when edges change. Always rebuild inupdateGraphData().