block / block/buzz

feat(desktop): add Rename channel to sidebar context menu

Open
#6,840 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## Summary

Add a **Rename channel** action to the Desktop sidebar channel context menu for users who can manage that channel.

## User report

A channel owner wanted to rename a channel, right-clicked it in the sidebar, and found no rename action. The current supported path is much less discoverable:

1. Open the channel.
2. Click the channel header's three-dot **Manage channel** button.
3. In **Channel Settings**, hover over and click the large channel name (the pencil appears only on hover).
4. Edit **Name** in the second dialog.
5. Click **Save changes**.

The user summarized the issue plainly: channel renaming should be available from right-click.

## Current implementation evidence

- `ChannelManagementSheet` gates editing with `canEditChannel`, opens a separate edit dialog, and saves the name through the existing update mutation:
https://github.com/block/buzz/blob/main/desktop/src/features/channels/ui/ChannelManagementSheet.tsx
- `ChannelHero` makes the name itself the `Edit channel` button and reveals the pencil on hover:
https://github.com/block/buzz/blob/main/desktop/src/features/channels/ui/ChannelManagementSheetRows.tsx
- The channel management sheet is reached through the channel header's three-dot **Manage channel** button:
https://github.com/block/buzz/issues/4642

I searched open and closed issues for `rename channel`, `right-click`, `sidebar`, and `context menu` and did not find an issue covering this specific discoverability gap.

## Proposed behavior

- Show **Rename channel** in the sidebar context menu when the current identity satisfies the existing `canManageChannel` capability.
- Selecting it should reuse the existing channel-edit mutation and permission checks, ideally opening the existing edit dialog with focus on **Name**.
- Do not show it for DMs or identities without channel-management permission.
- Keep the existing **Manage channel** path available.
- After save, refresh the sidebar label immediately and preserve the same error handling as the existing edit flow.

## Acceptance criteria

- An owner or admin can right-click a non-DM channel and choose **Rename channel**.
- The action edits only the intended channel and uses the existing authorization boundary.
- The sidebar and channel header reflect the new name after a successful save.
- Unauthorized users and agent/bot members do not receive a working rename action.
- Desktop tests cover visible, hidden, success, and failure states.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.