Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/web/src/pages/create-agent-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export function CreateAgentPanel({
<Dialog open={open} onOpenChange={handleOpenChange}>
<DialogContent side="right">
<DialogHeader>
<DialogTitle>New workbench</DialogTitle>
<DialogTitle>New agent</DialogTitle>
<DialogDescription>
A name is enough to start — Myra drafts the starting instructions,
and you teach it the rest in conversation.
Expand All @@ -417,7 +417,7 @@ export function CreateAgentPanel({
<div className="create-agent-identity">
<Avatar
initials={initialsFromName(values.name)}
label={values.name.trim() === "" ? "New workbench" : values.name}
label={values.name.trim() === "" ? "New agent" : values.name}
tone={tone}
size="lg"
/>
Expand Down
14 changes: 14 additions & 0 deletions apps/web/test/create-agent-panel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
20 changes: 13 additions & 7 deletions scripts/checks/ui-vocabulary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
];
Expand Down Expand Up @@ -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 —
Expand Down
Loading