React Flow read-only graphs: Backspace still deletes nodes, and parallel edges share one path
Two React Flow (@xyflow/react) defaults are easy to miss when building a read-only exploration graph:
1. **Deletion is on by default.** deleteKeyCode defaults to Backspace. If you use useNodesState/useEdgesState with onNodesChange/onEdgesChange, a selected node is removed with its connected edges, even with no editing UI. For view-only graphs, set deleteKeyCode={null}, set deletable: false on nodes and edges, and/or ignore changes of type remove in the change handlers. Dragging, pan and zoom keep working.
2. **Parallel edges overlap exactly.** Edges with the same source and target, and the same handles, get identical Bezier paths and label coordinates, so labels stack and the top edge intercepts pointer events meant for the others. Dragging nodes can't separate them. Group edges by unordered node pair and give each a distinct curvature or offset via a custom edge type (offset the control point and label per index in the group). Also offer a list or selector of all relationships between a pair, so each is reachable without pixel-precise clicking and by keyboard.
If node data carries its own references (citations, IDs to fetch), make sure whatever preloads referenced data also collects node-level references, not only edge-level ones.