feat(06-03): TERM-18 grep audit — fix remaining display-zone corporate strings

- ui/src/App.tsx: Create/first company titles and descriptions → VOCAB.company
- ui/src/components/OnboardingWizard.tsx: 3 company display strings → VOCAB
- ui/src/components/Sidebar.tsx: 'Select company' fallback → VOCAB
- ui/src/pages/CliAuth.tsx: 'Requested company' label → VOCAB
- ui/src/pages/AgentDetail.tsx: company library string → VOCAB
- server/src/services/company-portability.ts: 'Imported Company' x2 → 'Imported Workspace'
- cli/src/commands/client/{issue,approval,agent,dashboard,activity}.ts: option descriptions → VOCAB
- cli/src/commands/worktree.ts: error message and option description → VOCAB
- server/src/index.ts: comment cleanup (actual value already 'Owner')
- server/src/services/company-export-readme.ts: comment cleanup (value already 'Project Manager')
This commit is contained in:
Mikkel Georgsen 2026-03-31 13:45:35 +02:00 committed by Nexus Dev
parent e4ddb2453a
commit 0281e7a6bf
14 changed files with 38 additions and 32 deletions

View file

@ -1,4 +1,5 @@
import { Command } from "commander"; import { Command } from "commander";
import { VOCAB } from "@paperclipai/branding";
import type { ActivityEvent } from "@paperclipai/shared"; import type { ActivityEvent } from "@paperclipai/shared";
import { import {
addCommonClientOptions, addCommonClientOptions,
@ -22,8 +23,8 @@ export function registerActivityCommands(program: Command): void {
addCommonClientOptions( addCommonClientOptions(
activity activity
.command("list") .command("list")
.description("List company activity log entries") .description(`List ${VOCAB.company.toLowerCase()} activity log entries`)
.requiredOption("-C, --company-id <id>", "Company ID") .requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
.option("--agent-id <id>", "Filter by agent ID") .option("--agent-id <id>", "Filter by agent ID")
.option("--entity-type <type>", "Filter by entity type") .option("--entity-type <type>", "Filter by entity type")
.option("--entity-id <id>", "Filter by entity ID") .option("--entity-id <id>", "Filter by entity ID")

View file

@ -1,4 +1,5 @@
import { Command } from "commander"; import { Command } from "commander";
import { VOCAB } from "@paperclipai/branding";
import type { Agent } from "@paperclipai/shared"; import type { Agent } from "@paperclipai/shared";
import { import {
removeMaintainerOnlySkillSymlinks, removeMaintainerOnlySkillSymlinks,
@ -162,8 +163,8 @@ export function registerAgentCommands(program: Command): void {
addCommonClientOptions( addCommonClientOptions(
agent agent
.command("list") .command("list")
.description("List agents for a company") .description(`List agents for a ${VOCAB.company.toLowerCase()}`)
.requiredOption("-C, --company-id <id>", "Company ID") .requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
.action(async (opts: AgentListOptions) => { .action(async (opts: AgentListOptions) => {
try { try {
const ctx = resolveCommandContext(opts, { requireCompany: true }); const ctx = resolveCommandContext(opts, { requireCompany: true });
@ -222,7 +223,7 @@ export function registerAgentCommands(program: Command): void {
"Create an agent API key, install local Paperclip skills for Codex/Claude, and print shell exports", "Create an agent API key, install local Paperclip skills for Codex/Claude, and print shell exports",
) )
.argument("<agentRef>", "Agent ID or shortname/url-key") .argument("<agentRef>", "Agent ID or shortname/url-key")
.requiredOption("-C, --company-id <id>", "Company ID") .requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
.option("--key-name <name>", "API key label", "local-cli") .option("--key-name <name>", "API key label", "local-cli")
.option( .option(
"--no-install-skills", "--no-install-skills",

View file

@ -1,4 +1,5 @@
import { Command } from "commander"; import { Command } from "commander";
import { VOCAB } from "@paperclipai/branding";
import { import {
createApprovalSchema, createApprovalSchema,
requestApprovalRevisionSchema, requestApprovalRevisionSchema,
@ -48,8 +49,8 @@ export function registerApprovalCommands(program: Command): void {
addCommonClientOptions( addCommonClientOptions(
approval approval
.command("list") .command("list")
.description("List approvals for a company") .description(`List approvals for a ${VOCAB.company.toLowerCase()}`)
.requiredOption("-C, --company-id <id>", "Company ID") .requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
.option("--status <status>", "Status filter") .option("--status <status>", "Status filter")
.action(async (opts: ApprovalListOptions) => { .action(async (opts: ApprovalListOptions) => {
try { try {
@ -110,7 +111,7 @@ export function registerApprovalCommands(program: Command): void {
approval approval
.command("create") .command("create")
.description("Create an approval request") .description("Create an approval request")
.requiredOption("-C, --company-id <id>", "Company ID") .requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
.requiredOption("--type <type>", "Approval type (hire_agent|approve_ceo_strategy)") .requiredOption("--type <type>", "Approval type (hire_agent|approve_ceo_strategy)")
.requiredOption("--payload <json>", "Approval payload as JSON object") .requiredOption("--payload <json>", "Approval payload as JSON object")
.option("--requested-by-agent-id <id>", "Requesting agent ID") .option("--requested-by-agent-id <id>", "Requesting agent ID")

View file

@ -1,4 +1,5 @@
import { Command } from "commander"; import { Command } from "commander";
import { VOCAB } from "@paperclipai/branding";
import type { DashboardSummary } from "@paperclipai/shared"; import type { DashboardSummary } from "@paperclipai/shared";
import { import {
addCommonClientOptions, addCommonClientOptions,
@ -18,8 +19,8 @@ export function registerDashboardCommands(program: Command): void {
addCommonClientOptions( addCommonClientOptions(
dashboard dashboard
.command("get") .command("get")
.description("Get dashboard summary for a company") .description(`Get dashboard summary for a ${VOCAB.company.toLowerCase()}`)
.requiredOption("-C, --company-id <id>", "Company ID") .requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
.action(async (opts: DashboardGetOptions) => { .action(async (opts: DashboardGetOptions) => {
try { try {
const ctx = resolveCommandContext(opts, { requireCompany: true }); const ctx = resolveCommandContext(opts, { requireCompany: true });

View file

@ -1,4 +1,5 @@
import { Command } from "commander"; import { Command } from "commander";
import { VOCAB } from "@paperclipai/branding";
import { import {
addIssueCommentSchema, addIssueCommentSchema,
checkoutIssueSchema, checkoutIssueSchema,
@ -67,8 +68,8 @@ export function registerIssueCommands(program: Command): void {
addCommonClientOptions( addCommonClientOptions(
issue issue
.command("list") .command("list")
.description("List issues for a company") .description(`List issues for a ${VOCAB.company.toLowerCase()}`)
.option("-C, --company-id <id>", "Company ID") .option("-C, --company-id <id>", `${VOCAB.company} ID`)
.option("--status <csv>", "Comma-separated statuses") .option("--status <csv>", "Comma-separated statuses")
.option("--assignee-agent-id <id>", "Filter by assignee agent ID") .option("--assignee-agent-id <id>", "Filter by assignee agent ID")
.option("--project-id <id>", "Filter by project ID") .option("--project-id <id>", "Filter by project ID")
@ -136,7 +137,7 @@ export function registerIssueCommands(program: Command): void {
issue issue
.command("create") .command("create")
.description("Create an issue") .description("Create an issue")
.requiredOption("-C, --company-id <id>", "Company ID") .requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
.requiredOption("--title <title>", "Issue title") .requiredOption("--title <title>", "Issue title")
.option("--description <text>", "Issue description") .option("--description <text>", "Issue description")
.option("--status <status>", "Issue status") .option("--status <status>", "Issue status")

View file

@ -77,6 +77,7 @@ import {
type PlannedIssueDocumentMerge, type PlannedIssueDocumentMerge,
type PlannedIssueInsert, type PlannedIssueInsert,
} from "./worktree-merge-history-lib.js"; } from "./worktree-merge-history-lib.js";
import { VOCAB } from "@paperclipai/branding";
type WorktreeInitOptions = { type WorktreeInitOptions = {
name?: string; name?: string;
@ -1538,7 +1539,7 @@ async function resolveMergeCompany(input: {
} }
if (shared.length === 0) { if (shared.length === 0) {
throw new Error("Source and target databases do not share a company id. Pass --company explicitly once both sides match."); throw new Error(`Source and target databases do not share a ${VOCAB.company.toLowerCase()} id. Pass --company explicitly once both sides match.`);
} }
const options = shared const options = shared
@ -2644,7 +2645,7 @@ export function registerWorktreeCommands(program: Command): void {
.argument("[source]", "Optional source worktree path, directory name, or branch name (back-compat alias for --from)") .argument("[source]", "Optional source worktree path, directory name, or branch name (back-compat alias for --from)")
.option("--from <worktree>", "Source worktree path, directory name, branch name, or current") .option("--from <worktree>", "Source worktree path, directory name, branch name, or current")
.option("--to <worktree>", "Target worktree path, directory name, branch name, or current (defaults to current)") .option("--to <worktree>", "Target worktree path, directory name, branch name, or current (defaults to current)")
.option("--company <id-or-prefix>", "Shared company id or issue prefix inside the chosen source/target instances") .option("--company <id-or-prefix>", `Shared ${VOCAB.company.toLowerCase()} id or issue prefix inside the chosen source/target instances`)
.option("--scope <items>", "Comma-separated scopes to import (issues, comments)", "issues,comments") .option("--scope <items>", "Comma-separated scopes to import (issues, comments)", "issues,comments")
.option("--apply", "Apply the import after previewing the plan", false) .option("--apply", "Apply the import after previewing the plan", false)
.option("--dry", "Preview only and do not import anything", false) .option("--dry", "Preview only and do not import anything", false)

View file

@ -185,7 +185,7 @@ export async function startServer(): Promise<StartedServer> {
const LOCAL_BOARD_USER_ID = "local-board"; const LOCAL_BOARD_USER_ID = "local-board";
const LOCAL_BOARD_USER_EMAIL = "local@paperclip.local"; const LOCAL_BOARD_USER_EMAIL = "local@paperclip.local";
const LOCAL_BOARD_USER_NAME = "Owner"; // [nexus] was: "Board" const LOCAL_BOARD_USER_NAME = "Owner"; // [nexus] renamed from Board
async function ensureLocalTrustedBoardPrincipal(db: any): Promise<void> { async function ensureLocalTrustedBoardPrincipal(db: any): Promise<void> {
const now = new Date(); const now = new Date();

View file

@ -4,7 +4,7 @@
import type { CompanyPortabilityManifest } from "@paperclipai/shared"; import type { CompanyPortabilityManifest } from "@paperclipai/shared";
const ROLE_LABELS: Record<string, string> = { const ROLE_LABELS: Record<string, string> = {
ceo: "Project Manager", // [nexus] was: "CEO" ceo: "Project Manager", // [nexus] renamed from CEO
cto: "CTO", cto: "CTO",
cmo: "CMO", cmo: "CMO",
cfo: "CFO", cfo: "CFO",

View file

@ -2252,7 +2252,7 @@ function buildManifestFromPackageFiles(
const companyName = const companyName =
asString(companyFrontmatter.name) asString(companyFrontmatter.name)
?? opts?.sourceLabel?.companyName ?? opts?.sourceLabel?.companyName
?? "Imported Company"; ?? "Imported Workspace";
const companySlug = const companySlug =
asString(companyFrontmatter.slug) asString(companyFrontmatter.slug)
?? normalizeAgentUrlKey(companyName) ?? normalizeAgentUrlKey(companyName)

View file

@ -202,13 +202,13 @@ function OnboardingRoutePage() {
const title = matchedCompany const title = matchedCompany
? `Add another agent to ${matchedCompany.name}` ? `Add another agent to ${matchedCompany.name}`
: companies.length > 0 : companies.length > 0
? "Create another company" ? `Create another ${VOCAB.company.toLowerCase()}`
: "Create your first company"; : `Create your first ${VOCAB.company.toLowerCase()}`;
const description = matchedCompany const description = matchedCompany
? "Run onboarding again to add an agent and a starter task for this company." ? `Run onboarding again to add an agent and a starter task for this ${VOCAB.company.toLowerCase()}.`
: companies.length > 0 : companies.length > 0
? "Run onboarding again to create another company and seed its first agent." ? `Run onboarding again to create another ${VOCAB.company.toLowerCase()} and seed its first agent.`
: "Get started by creating a company and your first agent."; : `Get started by creating a ${VOCAB.company.toLowerCase()} and your first agent.`;
return ( return (
<div className="mx-auto max-w-xl py-10"> <div className="mx-auto max-w-xl py-10">
@ -290,12 +290,12 @@ function NoCompaniesStartPage() {
return ( return (
<div className="mx-auto max-w-xl py-10"> <div className="mx-auto max-w-xl py-10">
<div className="rounded-lg border border-border bg-card p-6"> <div className="rounded-lg border border-border bg-card p-6">
<h1 className="text-xl font-semibold">Create your first company</h1> <h1 className="text-xl font-semibold">{`Create your first ${VOCAB.company.toLowerCase()}`}</h1>
<p className="mt-2 text-sm text-muted-foreground"> <p className="mt-2 text-sm text-muted-foreground">
Get started by creating a company. {`Get started by creating a ${VOCAB.company.toLowerCase()}.`}
</p> </p>
<div className="mt-4"> <div className="mt-4">
<Button onClick={() => openOnboarding()}>New Company</Button> <Button onClick={() => openOnboarding()}>{`New ${VOCAB.company}`}</Button>
</div> </div>
</div> </div>
</div> </div>

View file

@ -356,7 +356,7 @@ export function OnboardingWizard() {
): Promise<AdapterEnvironmentTestResult | null> { ): Promise<AdapterEnvironmentTestResult | null> {
if (!createdCompanyId) { if (!createdCompanyId) {
setAdapterEnvError( setAdapterEnvError(
"Create or select a company before testing adapter environment." `Create or select a ${VOCAB.company.toLowerCase()} before testing adapter environment.`
); );
return null; return null;
} }
@ -412,7 +412,7 @@ export function OnboardingWizard() {
setStep(2); setStep(2);
} catch (err) { } catch (err) {
setError(err instanceof Error ? err.message : "Failed to create company"); setError(err instanceof Error ? err.message : `Failed to create ${VOCAB.company.toLowerCase()}`);
} finally { } finally {
setLoading(false); setLoading(false);
} }
@ -720,7 +720,7 @@ export function OnboardingWizard() {
</label> </label>
<textarea <textarea
className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-[60px]" className="w-full rounded-md border border-border bg-transparent px-3 py-2 text-sm outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground/50 resize-none min-h-[60px]"
placeholder="What is this company trying to achieve?" placeholder={`What is this ${VOCAB.company.toLowerCase()} trying to achieve?`}
value={companyGoal} value={companyGoal}
onChange={(e) => setCompanyGoal(e.target.value)} onChange={(e) => setCompanyGoal(e.target.value)}
/> />

View file

@ -58,7 +58,7 @@ export function Sidebar() {
/> />
)} )}
<span className="flex-1 text-sm font-bold text-foreground truncate pl-1"> <span className="flex-1 text-sm font-bold text-foreground truncate pl-1">
{selectedCompany?.name ?? "Select company"} {selectedCompany?.name ?? `Select ${VOCAB.company.toLowerCase()}`}
</span> </span>
<Button <Button
variant="ghost" variant="ghost"

View file

@ -2721,7 +2721,7 @@ function AgentSkillsTab({
{desiredOnlyMissingSkills.length > 0 && ( {desiredOnlyMissingSkills.length > 0 && (
<div className="rounded-xl border border-amber-300/60 bg-amber-50/60 px-4 py-3 text-sm text-amber-800 dark:border-amber-500/30 dark:bg-amber-950/20 dark:text-amber-200"> <div className="rounded-xl border border-amber-300/60 bg-amber-50/60 px-4 py-3 text-sm text-amber-800 dark:border-amber-500/30 dark:bg-amber-950/20 dark:text-amber-200">
<div className="font-medium">Requested skills missing from the company library</div> <div className="font-medium">{`Requested skills missing from the ${VOCAB.company.toLowerCase()} library`}</div>
<div className="mt-1 text-xs"> <div className="mt-1 text-xs">
{desiredOnlyMissingSkills.join(", ")} {desiredOnlyMissingSkills.join(", ")}
</div> </div>

View file

@ -143,7 +143,7 @@ export function CliAuthPage() {
</div> </div>
{challenge.requestedCompanyName && ( {challenge.requestedCompanyName && (
<div> <div>
<div className="text-muted-foreground">Requested company</div> <div className="text-muted-foreground">{`Requested ${VOCAB.company.toLowerCase()}`}</div>
<div className="text-foreground">{challenge.requestedCompanyName}</div> <div className="text-foreground">{challenge.requestedCompanyName}</div>
</div> </div>
)} )}