fix(sidebar): non-selectable channel names + copy/leave context menu actions#1260
Open
tellaho wants to merge 2 commits into
Open
fix(sidebar): non-selectable channel names + copy/leave context menu actions#1260tellaho wants to merge 2 commits into
tellaho wants to merge 2 commits into
Conversation
… actions Add select-none to the sidebar channel-name span so dragging no longer highlights names. Extend the shared channel context menu with Copy channel name, Copy channel ID, and a destructive Leave channel action (standard shadcn confirm dialog). Leave logic extracted into a useLeaveChannelDialog hook to keep AppSidebar under the file-size limit. Copy actions render unconditionally; leave is gated on the onLeaveChannel prop and wired only to stream sections. Co-authored-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Hoist select-none onto the three sidebar SidebarGroup containers so section/group headers, unread count + dot badges, and DM participant-count badges no longer highlight on cursor-drag. Drops the now-redundant per-span select-none on the channel-name span (the container covers it everywhere ChannelMenuButton renders). Co-authored-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.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.
Category: improvement
User Impact: Sidebar channel names no longer highlight when you drag across them, and right-clicking a channel now offers Copy channel name, Copy channel ID, and Leave channel (with a confirmation step).
Problem: Channel names in the sidebar were text-selectable, so dragging the cursor across them highlighted the text — a small but persistent annoyance. There was also no quick path to copy a channel name or ID, or to leave a channel, from the sidebar.
Solution: Added
select-noneto the channel-name span to stop the highlight-on-drag. Extended the shared channel context menu with three new actions — Copy channel name, Copy channel ID, and a destructive Leave channel that confirms via the standard shadcnAlertDialogbefore acting. Copy actions render unconditionally; Leave is gated on anonLeaveChannelprop and wired only to stream sections (DMs get copy-only, forums get neither). Leave state/mutation/dialog were extracted into auseLeaveChannelDialog()hook to keepAppSidebarunder the 1000-line file-size limit.File changes
desktop/src/features/sidebar/ui/SidebarSection.tsx
Added
select-noneto the channel-name truncate span so dragging no longer selects the text.desktop/src/features/sidebar/ui/CustomChannelSection.tsx
Added Copy channel name, Copy channel ID, and Leave channel items to the shared
ChannelContextMenuItems. Copy actions are always present; Leave is gated ononLeaveChannel.desktop/src/features/sidebar/ui/ChannelSectionDialogs.tsx
New
useLeaveChannelDialog()hook owning the leave target state,useLeaveChannelMutation, and the shadcn confirm dialog. Returns{ requestLeaveChannel, dialog }.desktop/src/features/sidebar/ui/AppSidebar.tsx
Wired the leave dialog hook in and passed
onLeaveChannelto stream sections. Stays under the file-size cap (994 lines).Reproduction Steps
Screenshots/Demos
Screen.Recording.2026-06-24.at.6.08.30.PM.mov
Context menu with the three new actions:

Leave-channel shadcn AlertDialog confirm (destructive styling):
