You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Validate API graph shape and add an error boundary around the diagram render #45
La respuesta de la API se castea directo a Graph (setGraph(data as Graph)) sin validación, y luego layout() hace muchas aserciones non-null y recursión sin límite (sizeOf/ancestorIn). Datos malformados o con ciclos en parent lanzan o entran en bucle infinito durante el render, tumbando todo el árbol de cliente (el try/catch del fetch no cubre el render).
Solución sugerida: Validar la respuesta con un schema en el borde, envolver <Diagram> en un error boundary y proteger la recursión con un set de visitados.
🇬🇧 English
The API response is cast straight to Graph (setGraph(data as Graph)) with no validation, then layout() runs many non-null assertions and unbounded recursion (sizeOf/ancestorIn). Malformed or cyclic-parent data throws or infinite-loops during render, crashing the whole client tree (the fetch try/catch does not cover render).
Activity