From c201f0431a2b3ca29af150f74ce07b2a7a3e93dc Mon Sep 17 00:00:00 2001 From: klopez4212 Date: Sat, 4 Jul 2026 11:46:52 +0100 Subject: [PATCH] Style the work drawer as a secondary-surface container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The work module's contents (label, branch chip, PR card) sit in a rounded secondary-background container, the divider against the conversation is gone, and the drawer eases open/closed on its width (300ms ease-out) instead of popping — the panel stays mounted so the close animates too. Co-Authored-By: Claude Fable 5 --- desktop/src/features/chats/ui/ChatDetail.tsx | 4 +- .../src/features/chats/ui/ChatWorkPanel.tsx | 43 +++++++++++++------ desktop/tests/e2e/chats-first-message.spec.ts | 2 + 3 files changed, 34 insertions(+), 15 deletions(-) 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" }); });