Conversation
JamesTLopez
requested changes
Feb 27, 2026
| if (!parentMap.has(edge.target)) { | ||
| parentMap.set(edge.target, new Set()); | ||
| } | ||
| parentMap.get(edge.target)!.add(edge.source); |
There was a problem hiding this comment.
We shouldn't use the non-null assertion operator here, either we do a check before we add the new edge source or use optional chaining guard here
JamesTLopez
reviewed
Feb 27, 2026
Comment on lines
+47
to
+48
| background-color: ${isHighlighted ? theme.colors.secondary_1 : theme.colors.accent_1}; | ||
| border-block: 1.5px solid ${isHighlighted ? theme.colors.secondary_dark : theme.colors.accent_2}; |
JamesTLopez
requested changes
Feb 27, 2026
| const schemaByName = new Map<string, Schema>(); | ||
|
|
||
| for (const node of nodes) { | ||
| schemaByName.set(node.id, node.data as Schema); |
There was a problem hiding this comment.
We shouldn't typecast here when we can avoid it. The type Node[] defined in the parameters from react-flow actual takes in a generic, we should be able to directly add type Schema.
nodes: Node<Schema>[]Same thing with edges, but doesn't look like theres going to be type issues here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to issue: #399
Summary
Adds graph layout algorithm to now handle the positioning of the nodes and edges. Imports new library d3-dag to handle the graph algorithm, and updates corresponding components to render the newly positioned nodes and edges.
Description of Changes
Special Instructions
Before running these changes, you will need to ...
pnpm i
Readiness Checklist
.env.schemafile and documented in the README