Skip to content

Wrap last column to terminal width in CLI table formatter#11829

Closed
Copilot wants to merge 13 commits into
mainfrom
copilot/fix-line-wrapping-description
Closed

Wrap last column to terminal width in CLI table formatter#11829
Copilot wants to merge 13 commits into
mainfrom
copilot/fix-line-wrapping-description

Conversation

Copilot AI commented May 7, 2026

Copy link
Copy Markdown
Contributor
  • Investigate CI failure in "Build linux_amd64 binaries" job
  • Identify root cause: go.mod inconsistency (duplicate golang.org/x/term entries and redundant hashicorp/go-version require)
  • Fix: run go mod tidy to resolve module file
  • Verify make build succeeds locally
  • Verify tests pass for affected packages

Copilot AI changed the title [WIP] Fix incorrect line wrapping for property description in rad resource-type show Wrap last column to terminal width in CLI table formatter May 7, 2026
Copilot AI requested a review from zachcasper May 7, 2026 16:10
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Unit Tests

    2 files  ±0    423 suites  +1   7m 17s ⏱️ ±0s
5 133 tests +6  5 131 ✅ +6  2 💤 ±0  0 ❌ ±0 
6 162 runs  +6  6 160 ✅ +6  2 💤 ±0  0 ❌ ±0 

Results for commit d6feba9. ± Comparison against base commit 48bcd09.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented May 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.50820% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.77%. Comparing base (48bcd09) to head (d6feba9).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cli/output/table.go 79.50% 14 Missing and 11 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11829      +/-   ##
==========================================
+ Coverage   51.74%   51.77%   +0.03%     
==========================================
  Files         726      726              
  Lines       45605    45697      +92     
==========================================
+ Hits        23597    23660      +63     
- Misses      19788    19806      +18     
- Partials     2220     2231      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zachcasper zachcasper marked this pull request as ready for review May 7, 2026 17:29
@zachcasper zachcasper requested a review from a team as a code owner May 7, 2026 17:29
Copilot AI review requested due to automatic review settings May 7, 2026 17:29
@zachcasper zachcasper requested review from a team as code owners May 7, 2026 17:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes misaligned CLI table output by replacing the text/tabwriter-based table renderer with a custom renderer that can word-wrap the last column to the detected terminal width, keeping continuation lines aligned under the correct column.

Changes:

  • Replaced the table output implementation with a manual renderer that computes column widths and wraps the last column when terminal width is known.
  • Added tests validating last-column wrapping behavior (including unbreakable tokens) and no-wrap behavior when terminal width is unknown.
  • Promoted golang.org/x/term (and github.com/hashicorp/go-version) to direct dependencies in go.mod.

Reviewed changes

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

File Description
pkg/cli/output/table.go New manual table renderer with terminal-width detection and last-column wrapping.
pkg/cli/output/table_test.go Added unit tests covering wrapping/no-wrapping scenarios.
go.mod Updated direct dependencies to include golang.org/x/term (and go-version).

Comment thread pkg/cli/output/table.go Outdated
Comment thread pkg/cli/output/table.go Outdated
Comment thread pkg/cli/output/table.go Outdated
Copilot AI requested a review from zachcasper May 8, 2026 16:36
…failure

The build was failing with "go: updates to go.mod needed; to update it:
go mod tidy". The go.mod had duplicate entries for golang.org/x/term
(v0.42.0 direct and v0.43.0 indirect) and a redundant direct require for
github.com/hashicorp/go-version that was already in the main require block.

Agent-Logs-Url: https://github.com/radius-project/radius/sessions/9f4270ed-d736-4423-8228-578856594aed

Co-authored-by: zachcasper <30731731+zachcasper@users.noreply.github.com>
@radius-functional-tests

radius-functional-tests Bot commented May 18, 2026

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository radius-project/radius
Commit ref d6feba9
Unique ID func0219540f81
Image tag pr-func0219540f81
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func0219540f81
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func0219540f81
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func0219540f81
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func0219540f81
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func0219540f81
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@zachcasper zachcasper marked this pull request as draft May 18, 2026 18:37
@zachcasper

Copy link
Copy Markdown
Contributor

Closing, will resubmit a new PR.

@zachcasper zachcasper closed this May 18, 2026
@zachcasper zachcasper deleted the copilot/fix-line-wrapping-description branch May 18, 2026 19:08
@zachcasper

Copy link
Copy Markdown
Contributor

Replacement PR #11931

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect line wrapping for property description in rad resource-type show

4 participants