Skip to content

Standardize CLI terminal output: separator widths and missing emojis#84

Merged
ewega merged 4 commits intomainfrom
copilot/analyze-cli-ux-tui
Mar 4, 2026
Merged

Standardize CLI terminal output: separator widths and missing emojis#84
ewega merged 4 commits intomainfrom
copilot/analyze-cli-ux-tui

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

  • Standardize summary separator width from 50 → 40 across 8 files to match printBanner width convention
  • Standardize status.go separator width from 42 → 40 for consistency
  • Fix status.go indented separator: " " + Repeat("─", 38) so total visible width = 40
  • Add emojis to section headers in cleanup.go — 📋 Deployment found, 🗑️ Resources to delete, 🌐 Endpoints that will be removed
  • Add emoji to section header in deploy_azure.go — 📋 Configuration
  • Add trailing blank lines after closing separators in configure_projects.go, configure_full.go (both branches) per terminal output standards
  • Verify build and tests still pass
  • Code review passed
  • CodeQL security scan passed (0 alerts)
Original prompt

Can you please do a detailed analysis and generate a report of any improvement we can make to the CLI UX/TUI? Is spacing and indentation appropritate? Anywhere we can safely add emojis? How to make it more readable?

Custom agent used: prettify
Terminal UX specialist — enforces output formatting rules, improves readability, and ensures consistent visual rhythm across all CLI commands.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
Copilot AI changed the title [WIP] Analyze CLI UX and TUI for improvements Standardize CLI terminal output: separator widths and missing emojis Mar 3, 2026
Copilot finished work on behalf of ewega March 3, 2026 20:24
@ewega ewega requested a review from Copilot March 3, 2026 21:24
@ewega ewega marked this pull request as ready for review March 3, 2026 21:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Standardizes the CLI’s terminal output formatting to better match the repository’s terminal UX conventions by aligning summary separator widths and adding emoji-prefixed section headers where they were missing.

Changes:

  • Normalize summary separators from 50 to 40 characters across multiple configure/status flows.
  • Add emoji prefixes to previously plain section headers in Azure deploy/cleanup output.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cmd/status.go Adjusts the status section separator width to 40.
cmd/deploy_azure.go Adds 📋 emoji to the “Configuration” header.
cmd/configure_scope_delete.go Updates summary separator width to 40.
cmd/configure_scope_add.go Updates summary separator width to 40.
cmd/configure_projects.go Updates project finalization summary separator width to 40.
cmd/configure_project_delete.go Updates delete summary separator width to 40.
cmd/configure_full.go Updates connection-setup summary separator widths to 40.
cmd/configure_connection_update.go Updates update summary separator width to 40.
cmd/configure_connection_delete.go Updates delete summary separator width to 40.
cmd/configure_connection_add.go Updates add summary separator width to 40.
cmd/cleanup.go Adds emoji-prefixed headers for deployment/resources/endpoints sections.

fmt.Printf(" Plugin: %s\n", pn)
}
fmt.Println(strings.Repeat("\u2500", 50))
fmt.Println(strings.Repeat("\u2500", 40))
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This summary block ends with a closing separator and then returns without printing a trailing blank line. Terminal Output Standards recommend a blank line after separators so the shell prompt (or subsequent output) doesn’t jam against the separator. Consider printing a final blank line after the closing separator here.

Suggested change
fmt.Println(strings.Repeat("\u2500", 40))
fmt.Println(strings.Repeat("\u2500", 40))
fmt.Println()

Copilot uses AI. Check for mistakes.
fmt.Println("\n" + strings.Repeat("─", 40))
fmt.Println("⚠️ No connections were created.")
fmt.Println(strings.Repeat("─", 50))
fmt.Println(strings.Repeat("─", 40))
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the len(results) == 0 branch, the summary separator block ends and the function returns an error immediately. Per Terminal Output Standards (blank line after separators), this will cause the subsequent error message printed by Execute() to appear directly under the separator with no breathing room. Add an extra blank line after the closing separator (or ensure the next output starts with a blank line) before returning.

Suggested change
fmt.Println(strings.Repeat("─", 40))
fmt.Println(strings.Repeat("─", 40))
fmt.Println()

Copilot uses AI. Check for mistakes.
@ewega
Copy link
Contributor

ewega commented Mar 4, 2026

@copilot apply changes based on the comments in this thread

… standards

Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot apply changes based on the comments in this thread

Applied both review suggestions in 95ebf11 — added fmt.Println() after the closing separator in configure_projects.go:356 (finalizeProject) and configure_full.go:173 (no-connections error branch) so the shell prompt / error output doesn't jam against the separator.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

cmd/status.go Outdated

printBanner("DevLake Status")
sep := " " + strings.Repeat("─", 42)
sep := " " + strings.Repeat("─", 40)
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sep is built as two leading spaces plus 40 box-drawing characters, so the visible separator line is 42 chars wide. If the goal is to standardize separators to 40 (matching the banner width convention), either drop the indent or reduce the repeat count so the total width is 40.

Suggested change
sep := " " + strings.Repeat("─", 40)
sep := " " + strings.Repeat("─", 38)

Copilot uses AI. Check for mistakes.
fmt.Printf(" %-18s ID=%d %q\n", name, r.ConnectionID, r.Name)
}
fmt.Println(strings.Repeat("─", 50))
fmt.Println(strings.Repeat("─", 40))
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The success summary returns immediately after printing the closing separator, so there’s no trailing blank line. Terminal output standards require a blank line after separators; add a final empty line after the closing separator here as well (matching the len(results)==0 branch).

Suggested change
fmt.Println(strings.Repeat("─", 40))
fmt.Println(strings.Repeat("─", 40))
fmt.Println()

Copilot uses AI. Check for mistakes.
@ewega
Copy link
Contributor

ewega commented Mar 4, 2026

@copilot apply changes based on the comments in this thread

… blank line in configure_full.go success path

Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot apply changes based on the comments in this thread

Applied both review suggestions in 17ea180:

  • cmd/status.go:83: Changed Repeat("─", 40)Repeat("─", 38) so the 2-space indent + 38 box-drawing chars = 40 total visible width.
  • cmd/configure_full.go:187: Added fmt.Println() after the success-path closing separator to match the error branch.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

@ewega ewega merged commit 6109601 into main Mar 4, 2026
11 checks passed
@ewega ewega deleted the copilot/analyze-cli-ux-tui branch March 4, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants