fix(projects): show project glyphs in channel rows

Route non-DM sidebar icons through the shared channel glyph so project-home channels render with their project folder mark.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
Thomas Petersen
2026-08-23 22:52:36 -04:00
committed by Wrench
parent 42b1825ada
commit 6961e4c9d0
2 changed files with 8 additions and 18 deletions

View File

@@ -1,13 +1,5 @@
import type * as React from "react";
import {
BellOff,
ChevronDown,
CircleDot,
FileText,
Hash,
Lock,
X,
} from "lucide-react";
import { BellOff, ChevronDown, CircleDot, X } from "lucide-react";
import {
ContextMenu,
@@ -18,6 +10,7 @@ import {
import { ChannelContextMenuItems } from "@/features/sidebar/ui/ChannelContextMenu";
import type { ActiveChannelTurnSummary } from "@/features/agents/activeAgentTurnsStore";
import { formatElapsed } from "@/features/agents/ui/agentSessionUtils";
import { ChannelGlyph } from "@/features/channels/ui/ChannelGlyph";
import { getEphemeralChannelDisplay } from "@/features/channels/lib/ephemeralChannel";
import { EphemeralChannelBadge } from "@/features/channels/ui/EphemeralChannelBadge";
import {
@@ -239,15 +232,7 @@ function SidebarChannelIcon({
);
}
if (channel.visibility === "private") {
return <Lock className={cn("h-4 w-4", className)} />;
}
if (channel.channelType === "forum") {
return <FileText className={cn("h-4 w-4", className)} />;
}
return <Hash className={cn("h-4 w-4", className)} />;
return <ChannelGlyph channel={channel} className={className} />;
}
export function ChannelMenuButton({

View File

@@ -292,6 +292,11 @@ test("creating a project opens its channel conversation", async ({ page }) => {
await expect(
page.getByTestId("chat-header").getByTestId("project-channel-icon"),
).toBeVisible();
await expect(
page
.getByTestId("channel-multi-repo-demo")
.getByTestId("project-channel-icon"),
).toBeVisible();
await expect(
page.getByTestId("channel-intro-action-add-files"),
).toBeVisible();