Use list cmdio#5417
Open
akshaysingla-db wants to merge 2 commits into
Open
Conversation
Yunquan flagged on the bug-bash form: the table shape changed between calls — the NAME column appeared the moment any sandbox had a custom `--name` set, and vanished when none did. Scripts that parsed `list` output had to handle two column layouts; users had to mentally remap columns based on workspace state. Always render the column. Sandboxes without a custom name (Name == "" or Name == SandboxID) display `-` (faint), same convention we already use elsewhere. The column width still scales to the longest *actual* name, so workspaces with only unnamed sandboxes render a narrow NAME column of dashes — visually quiet but structurally present. Co-authored-by: Isaac
Switches both lakebox table commands from hand-rolled `runewidth` padding
to the standard `cmd.Annotations["template"]` + `cmdio.Render` pipeline
used everywhere else in the CLI (see e.g. `cmd/workspace/clusters`). The
local `--json` flag is dropped in favor of the framework-wide `-o json`.
Trade-offs accepted to conform:
- Status text now reflects server-side casing ("Stopped") instead of
lowercased ("stopped").
- Column widths are byte-based via `text/tabwriter`; emoji / CJK
characters in `--name` may misalign rows, matching every other CLI
list today.
- The "stopped" status loses its faint-gray treatment; all states share
the same color family (green / yellow / blue) so the STATUS column
stays aligned under mixed-color rows.
Drops `mattn/go-runewidth` from the direct require list and the NOTICE
file (it's still present as an indirect dep via charmbracelet).
Co-authored-by: Isaac
Contributor
Waiting for approvalBased on git history, these people are best suited to review:
Eligible reviewers: Suggestions based on git history. See OWNERS for ownership rules. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Why
Tests