diff --git a/apps/web/src/components/chat/AgentSpawnCtaRow.test.ts b/apps/web/src/components/chat/AgentSpawnCtaRow.test.ts index d1b6d038f1..3fdb155323 100644 --- a/apps/web/src/components/chat/AgentSpawnCtaRow.test.ts +++ b/apps/web/src/components/chat/AgentSpawnCtaRow.test.ts @@ -1,11 +1,18 @@ import { describe, expect, it } from "vite-plus/test"; -import { AGENT_SPAWN_CTA_CLASS_NAME } from "./MessagesTimeline"; +import { AGENT_SPAWN_CTA_CLASS_NAME, AGENT_SPAWN_CTA_TRIGGER_CLASS_NAME } from "./MessagesTimeline"; describe("AgentSpawnCtaRow", () => { - it("keeps both rounded ends inside the timeline viewport", () => { - expect(AGENT_SPAWN_CTA_CLASS_NAME).not.toContain("-mx-1"); - expect(AGENT_SPAWN_CTA_CLASS_NAME).toContain("w-full"); - expect(AGENT_SPAWN_CTA_CLASS_NAME).toContain("rounded-md"); + it("uses the changed-files card shell", () => { + expect(AGENT_SPAWN_CTA_CLASS_NAME).toContain("rounded-2xl"); + expect(AGENT_SPAWN_CTA_CLASS_NAME).toContain("bg-secondary"); + expect(AGENT_SPAWN_CTA_CLASS_NAME).toContain("p-2"); + }); + + it("keeps the trigger inside the card", () => { + expect(AGENT_SPAWN_CTA_TRIGGER_CLASS_NAME).not.toContain("-mx-1"); + expect(AGENT_SPAWN_CTA_TRIGGER_CLASS_NAME).toContain("min-w-0"); + expect(AGENT_SPAWN_CTA_TRIGGER_CLASS_NAME).toContain("flex-1"); + expect(AGENT_SPAWN_CTA_TRIGGER_CLASS_NAME).toContain("rounded-lg"); }); }); diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx index 747ce9bc26..498c5ed6a1 100644 --- a/apps/web/src/components/chat/MessagesTimeline.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.tsx @@ -2125,7 +2125,10 @@ const stopRowToggle = (e: { stopPropagation: () => void }) => e.stopPropagation( * no animation. */ export const AGENT_SPAWN_CTA_CLASS_NAME = - "flex w-full items-center gap-2 rounded-md border border-border/60 bg-card/50 px-2.5 py-1.5 text-left text-[13px] transition hover:bg-accent/50"; + "@container/agent-spawn rounded-2xl border border-border/70 bg-secondary p-2 dark:border-transparent dark:bg-input/32"; + +export const AGENT_SPAWN_CTA_TRIGGER_CLASS_NAME = + "group flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden rounded-lg px-1 py-1.5 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"; const AgentSpawnCtaRow = memo(function AgentSpawnCtaRow(props: { workEntry: TimelineWorkEntry }) { const { workEntry } = props; @@ -2192,21 +2195,36 @@ const AgentSpawnCtaRow = memo(function AgentSpawnCtaRow(props: { workEntry: Time : "✓ completed"; return ( - +
+
+ + +
+
); });