Skip to content

fix(cli): improve namespace inspect member list display#6324

Merged
otavio merged 1 commit into
masterfrom
fix/cli-namespace-inspect-member-display
May 14, 2026
Merged

fix(cli): improve namespace inspect member list display#6324
otavio merged 1 commit into
masterfrom
fix/cli-namespace-inspect-member-display

Conversation

@geovannewashington
Copy link
Copy Markdown
Member

What changed?

Improved the member list display in namespace inspect:

  • Members are now sorted alphabetically by email, matching the UI
  • Replaced hardcoded %-12s padding with tabwriter for proper
    alignment with emails of any length
  • Changed Members: N to Members (N): for consistency with the
    other section headers

Why

With real client data, members with long emails or usernames caused
the role column to misalign. The ordering was also inconsistent with
the UI, which sorts members alphabetically by email.

How to test

  1. Start the environment with ./bin/docker-compose up -d
  2. Run cli namespace inspect <namespace> on a namespace with
    multiple members
  3. Verify members appear sorted alphabetically by email
  4. Verify the role column is aligned regardless of email length

Sort members alphabetically by email to match the UI ordering.
Replace fixed-width username padding with tabwriter for proper
column alignment regardless of email length. Update the Members
section header to include the count inline as "Members (N):".
@geovannewashington geovannewashington self-assigned this May 13, 2026
@geovannewashington geovannewashington requested a review from a team as a code owner May 13, 2026 18:43
@geovannewashington geovannewashington added go Pull requests that update Go code area/cli labels May 13, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Claude finished @geovannewashington's task in 32s —— View job


Code Review Complete

Reviewed 1 file across code quality, security, testing, Go patterns, and architecture — no issues found. The code looks good as-is.

The changes are clean and well-scoped: alphabetical sorting by email via slices.SortFunc, tabwriter for dynamic column alignment (consistent with the existing namespaceList pattern), and a minor header format tweak. All new imports are used, and the approach matches existing conventions in the file.


If you push additional changes and want a new review, tag @shellhub-io/admin and a team member can trigger it.

@otavio otavio merged commit 568bdec into master May 14, 2026
22 checks passed
@otavio otavio deleted the fix/cli-namespace-inspect-member-display branch May 14, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants