Add --dag-ascii option for job and step visualization#151
Merged
Conversation
- Add --dag-ascii option to display workflow job dependencies as ASCII art - Remove deprecated --graph and --graph-detailed options - Refactor renderConnections into smaller, focused methods for maintainability - Use ↗ bullet for embedded action steps to distinguish from regular steps Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Update README.md and README.ja.md CLI options section - Update English and Japanese CLI reference documentation - Add detailed output example showing box-style ASCII art Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the deprecated --graph option with a new --dag-ascii option that provides enhanced workflow visualization. The new renderer displays jobs as boxes containing their steps, using different bullet symbols (○ for regular steps, ↗ for embedded actions) for better visual distinction.
Changes:
- Replaced
--graphCLI option with--dag-asciifor improved workflow visualization - Implemented new
DagAsciiRendererto display jobs with their constituent steps in box format - Removed deprecated graph rendering implementation and associated tests
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
dag_ascii.go |
New renderer implementation with box-based job visualization and step display |
dag_ascii_test.go |
Comprehensive test coverage for the new renderer functionality |
workflow.go |
Added RenderDagAscii() method to support new visualization |
probe.go |
Renamed Graph() to DagAscii() to reflect new functionality |
cmd/probe/main.go |
Updated CLI to use --dag-ascii flag and corresponding handler |
cmd/probe/main_test.go |
Updated tests to reflect new CLI option |
graph.go |
Removed deprecated graph rendering code |
graph_test.go |
Removed tests for deprecated functionality |
docs/src/en/reference/cli-reference.md |
Updated documentation with new option and example output |
docs/src/ja/reference/cli-reference.md |
Updated Japanese documentation with new option and example output |
README.md |
Updated README to reference new --dag-ascii option |
README.ja.md |
Updated Japanese README to reference new --dag-ascii option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dag_ascii.go
Outdated
| lines = append(lines, nodeVertical+strings.Repeat(" ", leftPad)+name+strings.Repeat(" ", rightPad)+nodeVertical) | ||
|
|
||
| // Separator | ||
| lines = append(lines, nodeTeeRight+strings.Repeat(nodeHorizontal, innerWidth)+"┤") |
There was a problem hiding this comment.
The hard-coded string "┤" duplicates the constant nodeTeeLeft. Replace with the constant for consistency and maintainability.
Suggested change
| lines = append(lines, nodeTeeRight+strings.Repeat(nodeHorizontal, innerWidth)+"┤") | |
| lines = append(lines, nodeTeeRight+strings.Repeat(nodeHorizontal, innerWidth)+nodeTeeLeft) |
Use the nodeTeeLeft constant instead of hard-coded "┤" for consistency and maintainability. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Rename createBoxes method to createNodes - Rename renderDagAsciiJobNode parameter from box to node - Rename levelBoxes to levelNodes in renderLevel - Rename box loop variable to node in renderLevel - Rename childBox/parentBox to childNode/parentNode in buildConnectionMap - Rename box to node in calculateLevelPositions - Add rune constants for connection line characters (conn*) - Use conn* constants in flagsToChar instead of literal runes - Update comments accordingly Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Code Metrics Report
Details | | main (dff9fff) | #151 (2941244) | +/- |
|---------------------|----------------|----------------|-------|
+ | Coverage | 53.1% | 54.4% | +1.3% |
| Files | 63 | 63 | 0 |
| Lines | 6138 | 6382 | +244 |
+ | Covered | 3264 | 3477 | +213 |
- | Code to Test Ratio | 1:1.0 | 1:1.0 | -0.1 |
| Code | 12169 | 12579 | +410 |
+ | Test | 13230 | 13462 | +232 |
+ | Test Execution Time | 22s | 14s | -8s |Code coverage of files in pull request scope (70.7% → 76.7%)
Reported by octocov |
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
--dag-asciioption to display workflow job dependencies as ASCII art with steps--graphand--graph-detailedoptionsDagAsciiRenderer,DagAsciiJobNode)↗bullet for embedded action steps to distinguish from regular steps (○)Example Output
Changes
dag_ascii.godag_ascii_test.goworkflow.goRenderDagAscii()methodprobe.goDagAscii()methodcmd/probe/main.gograph.gograph_test.goTest plan
go test ./...- all tests passprobe --dag-ascii examples/embedded-job.yml- renders correctlyprobe --help- shows new option🤖 Generated with Claude Code