diff --git a/apps/web/src/components/chat/AgentSpawnCtaRow.test.ts b/apps/web/src/components/chat/AgentSpawnCtaRow.test.ts deleted file mode 100644 index 6bad55c9d4..0000000000 --- a/apps/web/src/components/chat/AgentSpawnCtaRow.test.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { describe, expect, it } from "vite-plus/test"; - -import { - AGENT_SPAWN_CTA_CLASS_NAME, - AGENT_SPAWN_CTA_TRIGGER_CLASS_NAME, - resolveAgentSpawnActionLabel, -} from "./MessagesTimeline"; - -describe("AgentSpawnCtaRow", () => { - 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"); - }); - - it("names the agents action when its visible label is hidden", () => { - expect(resolveAgentSpawnActionLabel(true)).toBe("Open agents"); - expect(resolveAgentSpawnActionLabel(false)).toBe("View agents"); - }); -}); diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx index ce53488b45..390f11c69f 100644 --- a/apps/web/src/components/chat/MessagesTimeline.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.tsx @@ -2124,15 +2124,6 @@ const stopRowToggle = (e: { stopPropagation: () => void }) => e.stopPropagation( * only roster. Freezes to past tense when every member settles. Static dot, * no animation. */ -export const AGENT_SPAWN_CTA_CLASS_NAME = - "@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"; - -export const resolveAgentSpawnActionLabel = (live: boolean) => - live ? "Open agents" : "View agents"; - const AgentSpawnCtaRow = memo(function AgentSpawnCtaRow(props: { workEntry: TimelineWorkEntry }) { const { workEntry } = props; const { agentPanelModel, onOpenAgents } = use(TimelineRowCtx); @@ -2197,12 +2188,16 @@ const AgentSpawnCtaRow = memo(function AgentSpawnCtaRow(props: { workEntry: Time ? `${failed} failed` : "✓ completed"; - const actionLabel = resolveAgentSpawnActionLabel(live); + const actionLabel = live ? "Open agents" : "View agents"; return ( -
+
-