You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Truncate long columns instead of line wrapping (#26)
Detecting terminal size, use smart column truncation. Seek to avoid
truncating shorter columns.
<img width="3420" height="378" alt="image"
src="https://github.com/user-attachments/assets/1e62dbf3-2d64-4aea-9e0d-1941e4a6300a"
/>
---
<!-- mesa-description-start -->
## TL;DR
Replaced line wrapping with smart column truncation for CLI tables,
which now adapt to the terminal's width to improve readability.
## Why we made these changes
Previously, wide tables would wrap lines, creating a messy and
difficult-to-read layout. This change ensures tables maintain a clean,
grid-like structure by truncating overflowing content, making the output
much easier to scan.
## What changed?
- **`cmd/table.go`**: Implemented intelligent table truncation logic
that detects terminal width to prevent line wrapping. A new algorithm
proportionally truncates the longest columns first while correctly
handling Unicode characters and ANSI color codes.
- **`cmd/proxies/get.go`**: Added color-coded status and a 'Last
Checked' timestamp to the proxy details output.
- **`cmd/app.go`**: Removed truncation for environment variable and
action names to ensure their full values are always displayed.
- **`cmd/proxies/list_test.go`**: Updated tests to reflect the new
'Status' column in the proxy list output.
## Validation
- [ ] Verified tables render correctly on different terminal widths.
- [ ] Confirmed that only necessary columns are truncated.
- [ ] Tested with tables that have no long columns to ensure no change
in behavior.
<sup>_Description generated by Mesa. [Update
settings](https://app.mesa.dev/onkernel/settings/pull-requests)_</sup>
<!-- mesa-description-end -->
0 commit comments