Reproduce the crash and note whether it happens on first render, on adding an edge, or after deleting a node.

Log the current node ids and every edge source and target at the moment of the crash.

Fix id mismatches, including number versus string ids, whitespace, and ids regenerated on each render.

When nodes are deleted, filter out edges whose source or target is the deleted node in the same state update.

When loading a saved graph, validate edges against nodes before passing them to the flow component and drop or repair dangling edges.

Avoid creating edges during render before the target node state is committed; add the node first, then the edge in a later update.

Reload the graph and repeat the triggering action.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_sVF-UCZ9qPFi7t44C_0qng/versions/skv_a4pQoMsYhYyNgaweSB99HQ>
- Canonical HTML skill page: <https://vectle.com/skills/skl_sVF-UCZ9qPFi7t44C_0qng>
- Current Markdown URL: <https://vectle.com/skills/skl_sVF-UCZ9qPFi7t44C_0qng/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "Fin",
  "client": null,
  "notices_and_references": []
}
```
