fix(cli): remove non-existent /dev from Dashboard URL#74
Conversation
WalkthroughRemoved the Dashboard field from the CLI simulation startup output; the SugaIntro now prints only App and Addr (the prior use of Pre-merge checks✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cli/internal/simulation/simulation.go (1)
86-86: Remove unnecessaryfmt.Sprintfwrapper.The static analysis correctly identifies that
version.ProductURLis already a string, so wrapping it infmt.Sprintfis redundant.Apply this diff to fix the linting issue:
- fmt.Println(tui.SugaIntro("App", s.appSpec.Name, "Addr", addr, "Dashboard", fmt.Sprintf("%s", version.ProductURL))) + fmt.Println(tui.SugaIntro("App", s.appSpec.Name, "Addr", addr, "Dashboard", version.ProductURL))
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cli/internal/simulation/simulation.go(1 hunks)docs/introduction.mdx(1 hunks)docs/quickstart.mdx(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
cli/internal/simulation/simulation.go (2)
cli/pkg/tui/intro.go (1)
SugaIntro(15-33)cli/internal/version/version.go (1)
ProductURL(22-22)
🪛 GitHub Check: Lint
cli/internal/simulation/simulation.go
[failure] 86-86:
S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple)
🪛 GitHub Actions: Test CLI
cli/internal/simulation/simulation.go
[error] 86-86: golangci-lint: S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple).
🔇 Additional comments (3)
docs/quickstart.mdx (1)
163-163: URL updated to match the current Dashboard location.The change correctly removes the non-existent
/devpath from the Dashboard URL, aligning with the actual URL structure.docs/introduction.mdx (1)
117-117: Documentation updated to reflect correct Dashboard URL.The change from
https://app.addsuga.com/devtohttps://app.addsuga.comcorrectly aligns the documentation with the actual Dashboard URL structure.cli/internal/simulation/simulation.go (1)
86-86: Dashboard URL correctly updated to remove non-existent/devpath.The change from
version.ProductURL + "/dev"toversion.ProductURLfixes the issue where users were being directed to a non-existent URL path. This aligns with the documentation updates and ensures users can access the actual Dashboard.
7902e26 to
6a43540
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
cli/internal/simulation/simulation.go (1)
78-86: Show localhost in intro when binding to all interfaces (UX polish)Currently prints ":" when SUGA_HOST is empty or "0.0.0.0". Prefer a click-friendly/local-friendly host in the intro while still listening on all interfaces.
addr := net.JoinHostPort(host, s.apiPort.String()) lis, err := net.Listen("tcp", addr) if err != nil { return fmt.Errorf("failed to listen: %v", err) } - fmt.Println(tui.SugaIntro("App", s.appSpec.Name, "Addr", addr)) + displayAddr := addr + if host == "" || host == "0.0.0.0" || host == "::" || host == "[::]" { + displayAddr = net.JoinHostPort("localhost", s.apiPort.String()) + } + fmt.Println(tui.SugaIntro("App", s.appSpec.Name, "Addr", displayAddr))
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cli/internal/simulation/simulation.go(1 hunks)docs/introduction.mdx(0 hunks)docs/quickstart.mdx(0 hunks)
💤 Files with no reviewable changes (2)
- docs/introduction.mdx
- docs/quickstart.mdx
🧰 Additional context used
🧬 Code graph analysis (1)
cli/internal/simulation/simulation.go (1)
cli/pkg/tui/intro.go (1)
SugaIntro(15-33)
|
🎉 This PR is included in version 0.1.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Fixes: NIT-278