mirror of
https://github.com/block/buzz.git
synced 2026-12-01 13:42:45 +00:00
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:
@@ -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({
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user