feat: add change member role in channel sidebar#313
Open
rbrackney-sq wants to merge 5 commits intomainfrom
Open
feat: add change member role in channel sidebar#313rbrackney-sq wants to merge 5 commits intomainfrom
rbrackney-sq wants to merge 5 commits intomainfrom
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kind:9000add-member upsert path — no relay or DB changes neededKnown limitations
kind:9000. A dedicatedmember_role_changedsystem message type in the relay's side effects handler would fix this.Test plan
🤖 Generated with Claude Code