diff --git a/packages/junior-dashboard/e2e/conversations.spec.ts b/packages/junior-dashboard/e2e/conversations.spec.ts index 7625ff68c..f70e39de8 100644 --- a/packages/junior-dashboard/e2e/conversations.spec.ts +++ b/packages/junior-dashboard/e2e/conversations.spec.ts @@ -108,7 +108,19 @@ test("opens a conversation in the built dashboard", async ({ page }) => { await expect( page.getByRole("heading", { name: "Conversations" }), ).toBeVisible(); - await page.getByRole("link", { name: /Checkout latency triage/ }).click(); + const publicConversationLink = page.getByRole("link", { + name: /Checkout latency triage/, + }); + const privateConversationLink = page.getByRole("link", { + name: /Direct Message/, + }); + await expect( + privateConversationLink.getByLabel("Private conversation"), + ).toBeVisible(); + await expect( + publicConversationLink.getByLabel("Private conversation"), + ).toHaveCount(0); + await publicConversationLink.click(); await expect(page).toHaveURL( `${server.baseURL}/conversations/${encodeURIComponent("slack:CQA123:1770000000.000100")}`, ); diff --git a/packages/junior-dashboard/src/client/conversations/ConversationSidebar.tsx b/packages/junior-dashboard/src/client/conversations/ConversationSidebar.tsx index 39db7ea7e..b97a18d13 100644 --- a/packages/junior-dashboard/src/client/conversations/ConversationSidebar.tsx +++ b/packages/junior-dashboard/src/client/conversations/ConversationSidebar.tsx @@ -1,5 +1,11 @@ import { useCallback, useEffect, useState } from "react"; -import { Archive, ArchiveRestore, CircleAlert, SquarePen } from "lucide-react"; +import { + Archive, + ArchiveRestore, + CircleAlert, + LockKeyhole, + SquarePen, +} from "lucide-react"; import { Link } from "react-router"; import { useArchiveConversation } from "./queries"; @@ -210,9 +216,15 @@ function ConversationSidebarRow(props: { {title} - {location ? ( -