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
The "empty subgraphs" section in draw_mermaid() skips multi-level prefixes (e.g., parent:child) due to the if ":" not in prefix check, causing 3+ level nested subgraph boxes to not render at all. This fix splits the prefix on : and opens subgraph blocks for each nesting level.
Before:if ":" not in prefix → skips multi-level prefixes entirely After:prefix.split(":") → iterates each level, opens subgraph blocks per level
How did you verify your code works?
All 22 tests in test_graph.py pass (18 snapshots passed) (17 snapshots passed, no updates needed)
Added test_nested_empty_subgraph_mermaid regression test
make format and make lint pass
Manually verified correct rendering for 3-level, 4-level nesting with draw_mermaid_png()
No successful run was found on master (a79298a) during the generation of this report, so 1338871 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
Friendly ping Eugene Yurtsev (@eyurtsev), this has been open for ~3 weeks now. This was the first PR submitted for this issue, all tests pass, and it's a small, focused change. Happy to address any feedback if needed!
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
core`langchain-core` package issues & PRsexternalfixFor PRs that implement a fixsize: S50-199 LOC
1 participant
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.
Fixes #35492
The "empty subgraphs" section in
draw_mermaid()skips multi-level prefixes (e.g.,parent:child) due to theif ":" not in prefixcheck, causing 3+ level nested subgraph boxes to not render at all. This fix splits the prefix on:and opens subgraph blocks for each nesting level.Before:
if ":" not in prefix→ skips multi-level prefixes entirelyAfter:
prefix.split(":")→ iterates each level, opens subgraph blocks per levelHow did you verify your code works?
test_graph.pypass (18 snapshots passed) (17 snapshots passed, no updates needed)test_nested_empty_subgraph_mermaidregression testmake formatandmake lintpassdraw_mermaid_png()Screenshots
Before (bug):

After (fix):
