From 86d63aaebe2c52e43753b3c63f71b628361b86d5 Mon Sep 17 00:00:00 2001 From: Wes Date: Fri, 27 Mar 2026 10:00:16 -0700 Subject: [PATCH] fix: show lock icon for private channels in chat header (#198) --- desktop/src/app/AppShell.tsx | 1 + desktop/src/features/chat/ui/ChatHeader.tsx | 26 ++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/desktop/src/app/AppShell.tsx b/desktop/src/app/AppShell.tsx index f3166bb51..31fffd2c4 100644 --- a/desktop/src/app/AppShell.tsx +++ b/desktop/src/app/AppShell.tsx @@ -668,6 +668,7 @@ export function AppShell() { ) : null } channelType={activeChannel?.channelType} + visibility={activeChannel?.visibility} description={channelDescription} statusBadge={ activeChannel?.channelType === "dm" && diff --git a/desktop/src/features/chat/ui/ChatHeader.tsx b/desktop/src/features/chat/ui/ChatHeader.tsx index ddc240686..679178a05 100644 --- a/desktop/src/features/chat/ui/ChatHeader.tsx +++ b/desktop/src/features/chat/ui/ChatHeader.tsx @@ -1,22 +1,33 @@ -import { Bot, CircleDot, FileText, Hash, Home, Settings2 } from "lucide-react"; +import { + Bot, + CircleDot, + FileText, + Hash, + Home, + Lock, + Settings2, +} from "lucide-react"; import type * as React from "react"; -import type { ChannelType } from "@/shared/api/types"; +import type { ChannelType, ChannelVisibility } from "@/shared/api/types"; type ChatHeaderProps = { actions?: React.ReactNode; title: string; description: string; channelType?: ChannelType; + visibility?: ChannelVisibility; mode?: "home" | "channel" | "settings" | "agents"; statusBadge?: React.ReactNode; }; function ChannelIcon({ channelType, + visibility, mode = "channel", }: { channelType?: ChannelType; + visibility?: ChannelVisibility; mode?: "home" | "channel" | "settings" | "agents"; }) { if (mode === "home") { @@ -35,6 +46,10 @@ function ChannelIcon({ return ; } + if (visibility === "private") { + return ; + } + if (channelType === "forum") { return ; } @@ -47,6 +62,7 @@ export function ChatHeader({ title, description, channelType, + visibility, mode = "channel", statusBadge, }: ChatHeaderProps) { @@ -58,7 +74,11 @@ export function ChatHeader({ >
- +