fix(mermaid): render nested transitions with empty labels#739
Open
KushalLukhi wants to merge 1 commit intopytransitions:masterfrom
Open
fix(mermaid): render nested transitions with empty labels#739KushalLukhi wants to merge 1 commit intopytransitions:masterfrom
KushalLukhi wants to merge 1 commit intopytransitions:masterfrom
Conversation
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.
Summary
Fix Mermaid nested graph generation to include transitions even when the trigger/label is an empty string.
This addresses #706 where outer-state transitions were omitted from Mermaid output when labels were empty.
Root cause
NestedGraph._add_edgesskipped edges with falsy labels:For transitions like
['', 'A', 'B'], this dropped otherwise valid edges entirely.Fix
source --> dest: labelsource --> destwhen label is emptyTests
Added
test_transitions_without_labels_between_outer_statesintests/test_mermaid.pyusing a minimal nested machine setup from the bug report.The test asserts that Mermaid output contains:
C --> AA --> BB --> CValidation