diff --git a/desktop/src/features/chats/ui/ChatDetail.tsx b/desktop/src/features/chats/ui/ChatDetail.tsx index 67e06cbe7..1f3300987 100644 --- a/desktop/src/features/chats/ui/ChatDetail.tsx +++ b/desktop/src/features/chats/ui/ChatDetail.tsx @@ -624,8 +624,8 @@ export function ChatDetail({ /> - {workPanelHref && showWorkPanel ? ( - + {workPanelHref ? ( + ) : null} diff --git a/desktop/src/features/chats/ui/ChatWorkPanel.tsx b/desktop/src/features/chats/ui/ChatWorkPanel.tsx index 079fdeaa8..f811eee26 100644 --- a/desktop/src/features/chats/ui/ChatWorkPanel.tsx +++ b/desktop/src/features/chats/ui/ChatWorkPanel.tsx @@ -5,14 +5,22 @@ import { useGithubPullRequestQuery, } from "@/shared/lib/githubPullRequest"; import { parseSupportedLinkPreview } from "@/shared/lib/linkPreview"; +import { cn } from "@/shared/lib/cn"; import { GithubPullRequestCard } from "@/shared/ui/link-preview-attachment"; /** * Right-hand work module for a chat whose agent produced a pull request: - * the PR's source branch and the live PR card (status, diff stats, link). - * The conversation column and composer shrink to make room. + * the PR's source branch and the live PR card (status, diff stats, link), + * grouped in a secondary-surface container. The drawer eases open/closed on + * its width so the conversation column and composer slide to make room. */ -export function ChatWorkPanel({ prHref }: { prHref: string }) { +export function ChatWorkPanel({ + open = true, + prHref, +}: { + open?: boolean; + prHref: string; +}) { const preview = parseSupportedLinkPreview(prHref); const ref = parseGithubPullRequestRef(prHref); const query = useGithubPullRequestQuery(ref); @@ -24,19 +32,28 @@ export function ChatWorkPanel({ prHref }: { prHref: string }) { return ( ); } diff --git a/desktop/tests/e2e/chats-first-message.spec.ts b/desktop/tests/e2e/chats-first-message.spec.ts index 8bba0895c..00bb848cc 100644 --- a/desktop/tests/e2e/chats-first-message.spec.ts +++ b/desktop/tests/e2e/chats-first-message.spec.ts @@ -1,5 +1,6 @@ import { expect, test } from "@playwright/test"; +import { waitForAnimations } from "../helpers/animations"; import { installMockBridge } from "../helpers/bridge"; test("first message in a new chat is sent and rendered", async ({ page }) => { @@ -159,5 +160,6 @@ test("first message in a new chat is sent and rendered", async ({ page }) => { await expect(workPanel).not.toBeVisible(); await page.getByTestId("toggle-work-panel").click(); await expect(workPanel).toBeVisible(); + await waitForAnimations(page); await page.screenshot({ path: "test-results/agent-pr-card.png" }); });