Skip to content

feat(cli): show who org members actually are, not just their UUIDs - #149

Merged
geekgonecrazy merged 1 commit into
devfrom
feat/org-member-list-identity-details
Aug 5, 2026
Merged

geekgonecrazy merged 1 commit into
devfrom
feat/org-member-list-identity-details

Conversation

@graywolf336

Copy link
Copy Markdown
Contributor

Problem

atomic org member list rendered IDENTITY_ID, ROLE, JOINED. The identity id is an opaque server-assigned UUID, so the only column that identified anyone identified nobody:

IDENTITY_ID                           ROLE   JOINED
550e8400-e29b-41d4-a716-446655440000  owner  2025-01-15T10:30:00Z

The server had nothing better to give: GET /orgs/{slug}/members returned the raw membership row with no join to identities.

Change

Paired with atomicdotdev/atomic-storage — "org member list returns identity details", which adds name, public_key, status, and email to the member payload. This renders them:

NAME   EMAIL            ROLE   STATUS  KEY                  JOINED
ada    ada@example.com  owner  active  MFRGGZDFMZTWQ2LK...  2025-01-15T10:30:00Z
  • The UUID column is dropped, not kept alongside. It is 36 characters wide, and member update/remove already accept a name or email, so nothing needed it. It stays in --format json.
  • KEY is a 16-character base32 prefix of the Ed25519 public key, matching identity list --verbose so the same key is recognisable in both listings. The full value is in the JSON form.

Why the public key earns a column

It is the value a caller's token is keyed by — the JWT kid. That makes it the field that answers "is my identity the one registered here?", which is the question behind a 401 Token references an identity that is not registered. Nothing else in the previous output could distinguish a stale registration from a wrong server.

Compatibility

Every new field is #[serde(default)] Option<String>. A server predating them omits them entirely, and without the defaults the whole response would fail to deserialize — member list would break against an un-upgraded deployment rather than degrading to the columns it does know. Missing values render as an em dash, so "the server did not say" stays distinguishable from "this member has no email on file".

This means the CLI can ship before or after the server; neither ordering breaks the other.

Testing

  • cargo test --workspace — 34 binaries, 0 failures
  • cargo fmt --check and cargo clippy --workspace --all-targets -- -D warnings — both clean
  • New coverage: serde round-trip with the new fields, a legacy payload with them absent, snake_case public_key, and the two display helpers

A test on the server side pins the JSON field names this client reads, since that contract now spans two repos.

`atomic org member list` rendered IDENTITY_ID, ROLE, JOINED. The identity
id is an opaque server-assigned UUID, so the only column that identified
anyone identified nobody:

    IDENTITY_ID                           ROLE   JOINED
    550e8400-e29b-41d4-a716-446655440000  owner  2025-01-15T10:30:00Z

The server now returns the member's identity alongside the membership
(atomic-storage: org member identity details), so render that instead:

    NAME   EMAIL            ROLE   STATUS  KEY                  JOINED
    ada    ada@example.com  owner  active  MFRGGZDFMZTWQ2LK...  2025-01-15T10:30:00Z

The UUID column is dropped rather than kept alongside: it is 36 characters
wide, and `member update`/`remove` already accept a name or email, so
nothing needed it. It remains in `--format json` for callers that do.

KEY is the Ed25519 public key as a 16-character base32 prefix, matching
`identity list --verbose` so the same key is recognisable in both places.
It is also the value a caller's token is keyed by (the JWT `kid`), which
makes it the field that answers "is my identity the one registered here?"
— the question behind a `401 Token references an identity that is not
registered`.

Every new field is `#[serde(default)] Option<String>`. A server predating
them omits them entirely, and without the defaults the whole response
would fail to deserialize — `member list` would break against an
un-upgraded deployment instead of degrading to the columns it does know.
Missing values render as an em dash rather than blank, so "the server did
not say" is distinguishable from "this member has no email".
@geekgonecrazy
geekgonecrazy merged commit 5c06112 into dev Aug 5, 2026
8 checks passed
@geekgonecrazy
geekgonecrazy deleted the feat/org-member-list-identity-details branch August 5, 2026 16:29
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.

2 participants