Skip to content

feat: add change member role in channel sidebar - #313

Merged
wesbillman merged 5 commits into
mainfrom
feat/change-member-role
Apr 14, 2026
Merged

feat: add change member role in channel sidebar#313
wesbillman merged 5 commits into
mainfrom
feat/change-member-role

Conversation

@rbrackney-sq

Copy link
Copy Markdown
Contributor

Summary

  • Added "Change role" submenu to member actions dropdown in the members sidebar
  • Owners and admins can change any other human member's role (admin, member, guest)
  • Bots cannot have their role changed (bot is an actor type, not a permission tier)
  • Owner assignment is blocked (requires a dedicated transfer-ownership flow)
  • Reuses the existing kind:9000 add-member upsert path — no relay or DB changes needed

Known limitations

  • System message: Role changes emit a "member added" system message since we reuse kind:9000. A dedicated member_role_changed system message type in the relay's side effects handler would fix this.
  • Last-owner safety: The relay's add-member upsert path does not guard against demoting the last owner (the remove path does). This is a pre-existing gap — our Tauri command blocks owner assignment, but a crafted client could still demote an owner via a raw event.

Test plan

  • Change a member from "member" to "admin" — verify role persists after page reload
  • Verify bots do not show the "Change role" menu
  • Verify owners do not show the "Change role" menu
  • Verify non-owner/admin users do not see "Change role" on other members
  • Attempt to change your own role — should not be available
  • Verify error message surfaces if role change fails

🤖 Generated with Claude Code

rbrackney-sq and others added 3 commits April 13, 2026 16:26
The members sidebar only supported adding members with a role at invite time
and removing them. There was no way to change an existing member's role without
removing and re-adding them.

Added a "Change role" submenu to the member actions dropdown that lets
owners/admins change any other member's role (admin, member, guest, bot).
The feature reuses the existing add_member upsert path which already handles
role updates, so no database or relay changes were needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Addresses code review feedback:
- Separate assignable roles by member type: people get admin/member/guest,
  bots get bot/guest. Prevents nonsensical people↔bot transitions.
- Block owner assignment via the change role command (requires dedicated
  transfer-ownership flow).
- Surface mutation pending state to disable the menu during role changes.
- Display role change errors in the sidebar error area.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bots should always be "bot" — changing a bot to guest makes it read-only
and unable to respond, which is a broken agent. Role changes are now only
available for human members (admin/member/guest).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rbrackney-sq and others added 2 commits April 13, 2026 19:55
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hooks.ts was 554 lines (limit 550). Moved the changeChannelMemberRole
mutation inline into MembersSidebar.tsx where it's the only consumer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wesbillman
wesbillman merged commit be83699 into main Apr 14, 2026
10 checks passed
@wesbillman
wesbillman deleted the feat/change-member-role branch April 14, 2026 15:14
jasonburks23 added a commit to jasonburks23/buzz that referenced this pull request Aug 19, 2026
… Holdout g2 PASS @9b1b6770a)

part of block#313. Additive test-only (+292/-0, crates/buzz-seat-clerk/src/bin/clerk.rs mod tests). No production code changed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Jason Burks <jason.burks@civilization.agency>
kaalph pushed a commit to kaalph/buzz that referenced this pull request Aug 21, 2026
# By Wes (12) and others
# Via GitHub
* main: (26 commits)
  feat(mobile): websocket streaming with real-time messaging (block#323)
  feat(markdown): add image/video preview, lightbox, and multi-image gallery (block#316)
  feat(composer): add rich text editor with formatting and mentions (block#310)
  feat(mobile): align design language with desktop and polish UI (block#321)
  fix: lock file registry (block#318)
  feat(mobile): QR/code pairing flow with security hardening (block#317)
  feat: Sprout Huddles — voice conversations with AI agents (block#299)
  feat(mobile): add channel list with relay integration (block#315)
  feat: add change member role in channel sidebar (block#313)
  feat(desktop): deterministic nested thread panels (block#308)
  fix: show private channels in channel browser when user is a member (block#311)
  Replace inline channel creation with dialog (block#312)
  chore: improve chat message layout to left-aligned design (block#309)
  Add edit dialog for managed agents with relay profile sync (block#277)
  fix(ci): build relay with optimized profile to fix flaky e2e tests (block#307)
  Update actions/checkout action to v6 (block#305)
  Update dependency @tanstack/react-query to v5.98.0 (block#304)
  Update dependency @playwright/test to v1.59.1 (block#303)
  Update react monorepo to v19.2.5 (block#302)
  feat(mobile): scaffold Flutter app with Riverpod & Catppuccin theme (block#306)
  ...

# Conflicts:
#	desktop/src-tauri/Cargo.lock
#	desktop/src-tauri/Cargo.toml
#	desktop/src-tauri/src/lib.rs
#	desktop/src/features/channels/ui/ChannelScreen.tsx
kaalph pushed a commit to kaalph/buzz that referenced this pull request Aug 21, 2026
# By Wes (12) and others
# Via GitHub
* main: (26 commits)
  feat(mobile): websocket streaming with real-time messaging (block#323)
  feat(markdown): add image/video preview, lightbox, and multi-image gallery (block#316)
  feat(composer): add rich text editor with formatting and mentions (block#310)
  feat(mobile): align design language with desktop and polish UI (block#321)
  fix: lock file registry (block#318)
  feat(mobile): QR/code pairing flow with security hardening (block#317)
  feat: Sprout Huddles — voice conversations with AI agents (block#299)
  feat(mobile): add channel list with relay integration (block#315)
  feat: add change member role in channel sidebar (block#313)
  feat(desktop): deterministic nested thread panels (block#308)
  fix: show private channels in channel browser when user is a member (block#311)
  Replace inline channel creation with dialog (block#312)
  chore: improve chat message layout to left-aligned design (block#309)
  Add edit dialog for managed agents with relay profile sync (block#277)
  fix(ci): build relay with optimized profile to fix flaky e2e tests (block#307)
  Update actions/checkout action to v6 (block#305)
  Update dependency @tanstack/react-query to v5.98.0 (block#304)
  Update dependency @playwright/test to v1.59.1 (block#303)
  Update react monorepo to v19.2.5 (block#302)
  feat(mobile): scaffold Flutter app with Riverpod & Catppuccin theme (block#306)
  ...

# Conflicts:
#	desktop/src-tauri/Cargo.lock
#	desktop/src-tauri/Cargo.toml
#	desktop/src-tauri/src/lib.rs
#	desktop/src/features/channels/ui/ChannelScreen.tsx
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