fix(desktop): show private/forum icons in channel browser rows - #6205
Open
santhiprakash wants to merge 1 commit into
Open
fix(desktop): show private/forum icons in channel browser rows#6205santhiprakash wants to merge 1 commit into
santhiprakash wants to merge 1 commit into
Conversation
santhiprakash
force-pushed
the
fix/desktop-channel-browser-private-visibility-6120
branch
2 times, most recently
from
August 27, 2026 01:50
2a02efa to
9f7c9f1
Compare
The Add Channel dialog rendered every row with a hardcoded '#' prefix, ignoring channel.visibility and channel.channelType. The sidebar already shows a lock for private channels and a file icon for forum channels; the channel browser drifted away from that and the same channel looked different in two surfaces of the same window (block#6120). Add a pure, unit-testable ChannelRowIcon component with getChannelRowIconKind() and use it in ChannelBrowserDialog. The sidebar now uses ChannelGlyph (introduced by block#6590), so this PR focuses on the browser surface. Tests cover the helper directly and render the component under JSDOM to assert the right lucide-* class reaches the DOM for each channel kind. Signed-off-by: Santhi Prakash <b.santhiprakash@gmail.com>
santhiprakash
force-pushed
the
fix/desktop-channel-browser-private-visibility-6120
branch
from
August 28, 2026 15:51
9f7c9f1 to
33bf57d
Compare
🔐 Codex Security Review
|
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.
Fixes #6120.
Summary
The Add Channel dialog (
ChannelBrowserDialog) rendered every row with a hardcoded#prefix, ignoringchannel.visibilityandchannel.channelType. The sidebar already shows a lock for private channels and a file icon for forum channels; the channel browser drifted away from that and the same channel looked different in two surfaces of the same window.This PR adds a pure, unit-testable
ChannelRowIconcomponent with agetChannelRowIconKind()helper and uses it inChannelBrowserDialogso the browser matches the sidebar's precedence (private→forum→#).While this branch was open,
mainlandedChannelGlyphinSidebarSectionvia #6590, which also handles the project-home icon. Rebased on currentmainand leftSidebarSectiononChannelGlyphto avoid duplicating or regressing that new behavior.ChannelRowIconis now the browser-only icon, which keeps the PR focused on the reported bug.Evidence
Checked against current
main:ChannelBrowserDialog.tsxwas emitting a literal#regardless of channel kind.SidebarSection.tsxnow usesChannelGlyphfor the same visibility/type precedence (plus project home).Reproduce
#. Nothing marks the private one as private.Expected
The browser row uses the same icon logic as the sidebar: lock for
visibility === private,FileTextfor forum channels,#otherwise.Testing
6/6 pass. The helper is tested directly (
getChannelRowIconKind) and the component is rendered under JSDOM + @testing-library/react to assert the right lucide-* class reaches the DOM for each channel kind.tsc --noEmit -p tsconfig.jsonis clean.Notes
+desktop/src/features/channels/ui/ChannelRowIcon.tsx(new): 41 lines.+desktop/src/features/channels/ui/ChannelRowIcon.test.mjs(new): 132 lines.~desktop/src/features/channels/ui/ChannelBrowserDialog.tsx: replace hardcoded#span withChannelRowIcon.