Conversation
There was a problem hiding this comment.
Pull request overview
This pull request enhances the DOT graph generation for state machines by introducing visual indicators for special transition types (internal, reentry, ignored) using emoji icons and a legend. The PR also modernizes the codebase by updating to Go 1.24+ and replacing deprecated sorting functions with the newer slices package.
Changes:
- Enhanced DOT graph visualization with emoji icons (🔄 reentry, 🔒 internal, 🚫 ignored) and an auto-generated legend
- Updated node styling from Mrecord to rounded boxes for better visual appearance
- Modernized Go version from 1.19 to 1.24 and updated dependencies to use
slicespackage instead ofsort
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| graph.go | Refactored graph generation logic to use emoji icons for transition types, added legend generation, modernized sorting with slices.SortFunc, and simplified label formatting |
| go.mod | Updated Go version from 1.19 to 1.24 to support modern language features |
| .github/workflows/test.yml | Updated CI test matrix to Go 1.24.x and 1.25.x |
| testdata/golden/*.dot | Updated golden test files to reflect new graph styling and transition icons |
| README.md | Changed documentation to reference SVG file instead of PNG for graph examples |
| assets/phone-graph.svg | Added SVG version of phone call state machine graph |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request introduces several improvements to the DOT graph generation for state machines, modernizes dependencies, and updates documentation and test data accordingly. The most significant change is the enhancement of the DOT output to visually distinguish special transition types (internal, reentry, ignored) using icons and a legend, making generated graphs more informative and user-friendly. Additionally, the codebase has been updated to use newer Go versions and modern library features.