Skip to content

Use list cmdio#5417

Open
akshaysingla-db wants to merge 2 commits into
databricks:demo-lakeboxfrom
akshaysingla-db:akshay/lakebox-list-cmdio
Open

Use list cmdio#5417
akshaysingla-db wants to merge 2 commits into
databricks:demo-lakeboxfrom
akshaysingla-db:akshay/lakebox-list-cmdio

Conversation

@akshaysingla-db
Copy link
Copy Markdown
Collaborator

Changes

Why

Tests

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
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Waiting for approval

Based on git history, these people are best suited to review:

  • @pietern -- recent work in ./, cmd/lakebox/

Eligible reviewers: @andrewnester, @anton-107, @denik, @renaudhartert-db, @shreyas-goenka, @simonfaltum

Suggestions based on git history. See OWNERS for ownership rules.

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.

1 participant