From c5556cba52c4a79721145b8734493dd8301722a6 Mon Sep 17 00:00:00 2001 From: Kubudak90 Date: Wed, 8 Apr 2026 03:33:42 +0300 Subject: [PATCH 1/2] fix: Improve CLI output clarity for check:data and check:construction commands Fixes #428 The CLI output was unclear when commands failed or partially succeeded. This change improves the output by: - Adding clear STATUS: FAILED/SUCCESS headers - Providing structured error details section - Adding suggested actions for users on failure - Using consistent formatting with visual separators - Improving end condition display Changes: - pkg/results/data_results.go: Improved Print() function - pkg/results/construction_results.go: Improved Print() function --- pkg/results/construction_results.go | 28 ++++++++++++++++----- pkg/results/data_results.go | 38 +++++++++++++++++++++++------ 2 files changed, 52 insertions(+), 14 deletions(-) diff --git a/pkg/results/construction_results.go b/pkg/results/construction_results.go index 3d968247..5d0872f6 100644 --- a/pkg/results/construction_results.go +++ b/pkg/results/construction_results.go @@ -44,18 +44,34 @@ type CheckConstructionResults struct { // Print logs CheckConstructionResults to the console. func (c *CheckConstructionResults) Print() { + fmt.Println() + fmt.Println("========================================") + if len(c.Error) > 0 { - fmt.Printf("\n") - color.Red("Error: %s", c.Error) + color.Red("STATUS: FAILED") + fmt.Println() + color.Yellow("Error Details:") + fmt.Printf(" %s\n", c.Error) + fmt.Println() + color.Cyan("Suggested Actions:") + fmt.Println(" 1. Review the error message above") + fmt.Println(" 2. Check your construction configuration") + fmt.Println(" 3. Verify the Rosetta server is accessible") + fmt.Println(" 4. Run with --help for more options") } else { - fmt.Printf("\n") - color.Green("Success: %s", types.PrintStruct(c.EndConditions)) + color.Green("STATUS: SUCCESS") + fmt.Println() + color.Cyan("Construction check completed successfully!") + fmt.Printf("End Conditions: %s\n", types.PrintStruct(c.EndConditions)) } + + fmt.Println() + fmt.Println("========================================") + fmt.Println() - fmt.Printf("\n") if c.Stats != nil { c.Stats.Print() - fmt.Printf("\n") + fmt.Println() } } diff --git a/pkg/results/data_results.go b/pkg/results/data_results.go index 7ff08dfa..44d33719 100644 --- a/pkg/results/data_results.go +++ b/pkg/results/data_results.go @@ -65,24 +65,46 @@ type CheckDataResults struct { // Print logs CheckDataResults to the console. func (c *CheckDataResults) Print() { + fmt.Println() + fmt.Println("========================================") + if len(c.Error) > 0 { - fmt.Printf("\n") - color.Red("Error: %s", c.Error) - } + color.Red("STATUS: FAILED") + fmt.Println() + color.Yellow("Error Details:") + fmt.Printf(" %s\n", c.Error) + fmt.Println() + color.Cyan("Suggested Actions:") + fmt.Println(" 1. Review the error message above") + fmt.Println(" 2. Check your configuration file") + fmt.Println(" 3. Verify the Rosetta server is accessible") + fmt.Println(" 4. Run with --help for more options") + } else { + color.Green("STATUS: SUCCESS") + fmt.Println() + color.Cyan("All checks passed successfully!") + } + + fmt.Println() + fmt.Println("========================================") + fmt.Println() if c.EndCondition != nil { - fmt.Printf("\n") - color.Green("Success: %s [%s]", c.EndCondition.Type, c.EndCondition.Detail) + fmt.Println("End Condition:") + fmt.Printf(" Type: %s\n", c.EndCondition.Type) + if len(c.EndCondition.Detail) > 0 { + fmt.Printf(" Detail: %s\n", c.EndCondition.Detail) + } + fmt.Println() } - fmt.Printf("\n") if c.Tests != nil { c.Tests.Print() - fmt.Printf("\n") + fmt.Println() } if c.Stats != nil { c.Stats.Print() - fmt.Printf("\n") + fmt.Println() } } From f9fbf5bb5c8ebfd95503589abad66b0bc229282b Mon Sep 17 00:00:00 2001 From: Kubudak90 Date: Wed, 8 Apr 2026 03:50:46 +0300 Subject: [PATCH 2/2] docs: fix broken documentation links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace broken CDP documentation URLs with working GitHub repository links: - docs.cdp.coinbase.com/mesh/docs/welcome/ → github.com/coinbase/mesh-specifications - docs.cdp.coinbase.com/mesh/docs/mesh-cli/ → github.com/coinbase/mesh-cli#readme - docs.cdp.coinbase.com/mesh/docs/mesh-test/ → github.com/coinbase/mesh-cli#checkdata Fixes #431 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 79f9104e..784cd377 100644 --- a/README.md +++ b/README.md @@ -52,11 +52,11 @@ You can also view releases and change log information in the [Releases](https:// ## Documentation -You can find the Mesh API documentation [here](https://docs.cdp.coinbase.com/mesh/docs/welcome/) +You can find the Mesh API documentation [here](https://github.com/coinbase/mesh-specifications) -For more information on the mesh-cli tool, read our [The mesh-cli tool](https://docs.cdp.coinbase.com/mesh/docs/mesh-cli/) documentation. +For more information on the mesh-cli tool, read our [The mesh-cli tool](https://github.com/coinbase/mesh-cli#readme) documentation. -For more information on how to test your implementation file with the `mesh-cli` tool, read our [How to Test Your Mesh Implementation](https://docs.cdp.coinbase.com/mesh/docs/mesh-test/) documentation. +For more information on how to test your implementation file with the `mesh-cli` tool, read our [How to Test Your Mesh Implementation](https://github.com/coinbase/mesh-cli#checkdata) documentation. ## Contributing