diff --git a/apps/web/src/pages/create-agent-panel.tsx b/apps/web/src/pages/create-agent-panel.tsx index 281edf904..b28c3e6cb 100644 --- a/apps/web/src/pages/create-agent-panel.tsx +++ b/apps/web/src/pages/create-agent-panel.tsx @@ -395,7 +395,7 @@ export function CreateAgentPanel({ - New workbench + New agent A name is enough to start — Myra drafts the starting instructions, and you teach it the rest in conversation. @@ -417,7 +417,7 @@ export function CreateAgentPanel({
diff --git a/apps/web/test/create-agent-panel.test.tsx b/apps/web/test/create-agent-panel.test.tsx index f2c52fa91..a8733fd35 100644 --- a/apps/web/test/create-agent-panel.test.tsx +++ b/apps/web/test/create-agent-panel.test.tsx @@ -157,6 +157,20 @@ describe("CreateAgentPanel happy path", () => { expect(details?.open).toBe(false); }); + // CL-6745: create-agent dialog is an agent-definition mint, not a + // workbench mint — title and CTA must use the agent noun. + test("dialog title and primary CTA use the agent noun, not workbench", async () => { + await mount(); + const heading = [ + ...document.body.querySelectorAll("h2, [role='heading']"), + ].find((el) => (el.textContent ?? "").trim() === "New agent"); + expect(heading).toBeDefined(); + expect(document.body.textContent).not.toContain("New workbench"); + const cta = findButton("Get started"); + expect(cta).toBeDefined(); + expect(cta?.textContent).not.toMatch(/workbench/i); + }); + test("a name alone is enough — purpose is optional, never a gate", async () => { await mount(); const button = findButton("Get started"); diff --git a/scripts/checks/ui-vocabulary.ts b/scripts/checks/ui-vocabulary.ts index 30c01a4f4..ed3af28f4 100644 --- a/scripts/checks/ui-vocabulary.ts +++ b/scripts/checks/ui-vocabulary.ts @@ -63,12 +63,14 @@ const BANNED_TERMS: readonly { name: string; pattern: RegExp }[] = [ // this cannot false-positive on the legal word the same way "bench" // above does not match inside "workbench". { name: "workspace", pattern: /\bworkspaces?\b/i }, - // CL-6138: one creation verb. "agent" alone stays legal copy — it's a - // starting point you pick, not something you mint ("Search or create - // agents", "No agents available") — but the two-and-three-word - // creation-verb phrases below are banned outright: "New workbench" is - // the only mint action a person ever sees, so nothing may offer "New - // agent" or "Create new agent" as a second one. + // CL-6138: one creation verb for minting a workbench. "agent" alone stays + // legal copy — it's a starting point you pick, not something you mint + // ("Search or create agents", "No agents available") — but the + // two-and-three-word creation-verb phrases below are banned from + // workbench-mint surfaces: "New workbench" is the only mint action a + // person ever sees there. CL-6745 restores "New agent" on the + // create-agent *definition* dialog (allowlisted below) — that path drafts + // an agent template, not a workbench. { name: "new agent", pattern: /\bnew agent\b/i }, { name: "create new agent", pattern: /\bcreate new agent\b/i }, ]; @@ -96,7 +98,11 @@ const BAND_LABEL_PATTERN = * phrase landing in a different file still fails — an allowlist entry * is a ruling about one spot, never a blanket exemption for a phrase. */ -const ALLOWLIST: readonly { relPath: string; text: string }[] = []; +const ALLOWLIST: readonly { relPath: string; text: string }[] = [ + // CL-6745: create-agent dialog drafts an agent definition; avatar + // fallback label uses the agent noun (title is JSX text, unscanned). + { relPath: "apps/web/src/pages/create-agent-panel.tsx", text: "New agent" }, +]; /** Strips comments and console/logger calls so log lines and * documentation never count as user-facing copy. Deliberately simple —