buzz icon indicating copy to clipboard operation
buzz copied to clipboard

feat(cli): include display names in channel members

Open kiranmagic7 opened this issue 3 months ago • 1 comments

Summary

buzz channels members serialized the channel membership tags directly, so each record contained only pubkey and role. This change loads member profiles with one batched kind:0 filter and adds a nullable display_name to each record while preserving membership order and roles. The profile projection uses the relay's existing name fallback; missing or malformed profiles produce null.

Related issue

Fixes #4437. No duplicate implementation was found; the closest prior CLI mention work is #3330, which does not change channels members output.

Testing

  • cargo test -p buzz-cli channel_member -- --nocapture
  • cargo test -p buzz-cli
  • cargo clippy -p buzz-cli --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • just ci

All checks passed. No screenshots are needed for this CLI JSON change.

kiranmagic7 avatar Aug 03 '26 03:08 kiranmagic7

looking at this for #4437 — if you're joining display names via users bulk on the same pubkeys from the membership event, that matches how the relay does mention routing. please keep display_name nullable when a profile is missing so tooling can tell "no name" from "not returned".

chessing234 avatar Aug 03 '26 10:08 chessing234

Thanks, that is the contract in this branch now. display_name is added as JSON null when no profile/name is available, so callers can distinguish a missing profile from a returned empty string. The regression channel_members_include_nullable_profile_display_names covers that nullable path and I will keep it unchanged.

kiranmagic7 avatar Aug 03 '26 15:08 kiranmagic7

The nullable display_name contract is unchanged. I merged current main into the branch, resolved the channels.rs conflict, and reran the two focused channel-member tests, all 345 buzz-cli tests, and just ci successfully on e70a995cd.

kiranmagic7 avatar Aug 11 '26 03:08 kiranmagic7

🔐 Codex Security Review

Status: review required for the current range.

The current range is 5397ea49e27fd56d4e0346e2120906d09ac91579...ced7113861c2c5846f49525e84b127574989910b. A new review must complete for this exact range. When manual authorization is required, a user with write access must comment exactly @buzz-security-review ced7113861c2c5846f49525e84b127574989910b to authorize a new review. Any previous review applies only to its recorded range.

github-actions[bot] avatar Aug 27 '26 22:08 github-actions[bot]

The canvas changes in #6780 just landed and rewrote channels.rs, so I rechecked the overlap against current main (b6a26556e). This branch still merges cleanly: those changes begin after cmd_list_channel_members, and the nullable display_name contract plus focused tests are untouched. The remaining blockers are review and Block-side workflow/security authorization for this exact head.

kiranmagic7 avatar Sep 23 '26 15:09 kiranmagic7

Current main introduced a conflict in channels.rs when #8175 added the channel-label parsing test. I merged it into this branch, preserving both that test and the nullable display-name coverage. GitHub now reports the updated head ced711386 mergeable, and DCO passes. git diff --check also passes; I could not rerun the Rust tests on this host because cargo is not installed.

kiranmagic7 avatar Oct 15 '26 15:10 kiranmagic7

main now includes #8234, which also changes channels.rs, so I checked the overlap. That patch only extends cmd_list_channels for OutputFormat::Agent; cmd_list_channel_members still returns the raw membership tags without display_name. This head still merges cleanly with current main, so the nullable profile enrichment remains separate.

kiranmagic7 avatar Oct 21 '26 15:10 kiranmagic7