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:
parent
e4ddb2453a
commit
0281e7a6bf
14 changed files with 38 additions and 32 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { Command } from "commander";
|
||||
import { VOCAB } from "@paperclipai/branding";
|
||||
import type { ActivityEvent } from "@paperclipai/shared";
|
||||
import {
|
||||
addCommonClientOptions,
|
||||
|
|
@ -22,8 +23,8 @@ export function registerActivityCommands(program: Command): void {
|
|||
addCommonClientOptions(
|
||||
activity
|
||||
.command("list")
|
||||
.description("List company activity log entries")
|
||||
.requiredOption("-C, --company-id <id>", "Company ID")
|
||||
.description(`List ${VOCAB.company.toLowerCase()} activity log entries`)
|
||||
.requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
|
||||
.option("--agent-id <id>", "Filter by agent ID")
|
||||
.option("--entity-type <type>", "Filter by entity type")
|
||||
.option("--entity-id <id>", "Filter by entity ID")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { Command } from "commander";
|
||||
import { VOCAB } from "@paperclipai/branding";
|
||||
import type { Agent } from "@paperclipai/shared";
|
||||
import {
|
||||
removeMaintainerOnlySkillSymlinks,
|
||||
|
|
@ -162,8 +163,8 @@ export function registerAgentCommands(program: Command): void {
|
|||
addCommonClientOptions(
|
||||
agent
|
||||
.command("list")
|
||||
.description("List agents for a company")
|
||||
.requiredOption("-C, --company-id <id>", "Company ID")
|
||||
.description(`List agents for a ${VOCAB.company.toLowerCase()}`)
|
||||
.requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
|
||||
.action(async (opts: AgentListOptions) => {
|
||||
try {
|
||||
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",
|
||||
)
|
||||
.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(
|
||||
"--no-install-skills",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { Command } from "commander";
|
||||
import { VOCAB } from "@paperclipai/branding";
|
||||
import {
|
||||
createApprovalSchema,
|
||||
requestApprovalRevisionSchema,
|
||||
|
|
@ -48,8 +49,8 @@ export function registerApprovalCommands(program: Command): void {
|
|||
addCommonClientOptions(
|
||||
approval
|
||||
.command("list")
|
||||
.description("List approvals for a company")
|
||||
.requiredOption("-C, --company-id <id>", "Company ID")
|
||||
.description(`List approvals for a ${VOCAB.company.toLowerCase()}`)
|
||||
.requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
|
||||
.option("--status <status>", "Status filter")
|
||||
.action(async (opts: ApprovalListOptions) => {
|
||||
try {
|
||||
|
|
@ -110,7 +111,7 @@ export function registerApprovalCommands(program: Command): void {
|
|||
approval
|
||||
.command("create")
|
||||
.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("--payload <json>", "Approval payload as JSON object")
|
||||
.option("--requested-by-agent-id <id>", "Requesting agent ID")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { Command } from "commander";
|
||||
import { VOCAB } from "@paperclipai/branding";
|
||||
import type { DashboardSummary } from "@paperclipai/shared";
|
||||
import {
|
||||
addCommonClientOptions,
|
||||
|
|
@ -18,8 +19,8 @@ export function registerDashboardCommands(program: Command): void {
|
|||
addCommonClientOptions(
|
||||
dashboard
|
||||
.command("get")
|
||||
.description("Get dashboard summary for a company")
|
||||
.requiredOption("-C, --company-id <id>", "Company ID")
|
||||
.description(`Get dashboard summary for a ${VOCAB.company.toLowerCase()}`)
|
||||
.requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
|
||||
.action(async (opts: DashboardGetOptions) => {
|
||||
try {
|
||||
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { Command } from "commander";
|
||||
import { VOCAB } from "@paperclipai/branding";
|
||||
import {
|
||||
addIssueCommentSchema,
|
||||
checkoutIssueSchema,
|
||||
|
|
@ -67,8 +68,8 @@ export function registerIssueCommands(program: Command): void {
|
|||
addCommonClientOptions(
|
||||
issue
|
||||
.command("list")
|
||||
.description("List issues for a company")
|
||||
.option("-C, --company-id <id>", "Company ID")
|
||||
.description(`List issues for a ${VOCAB.company.toLowerCase()}`)
|
||||
.option("-C, --company-id <id>", `${VOCAB.company} ID`)
|
||||
.option("--status <csv>", "Comma-separated statuses")
|
||||
.option("--assignee-agent-id <id>", "Filter by assignee agent ID")
|
||||
.option("--project-id <id>", "Filter by project ID")
|
||||
|
|
@ -136,7 +137,7 @@ export function registerIssueCommands(program: Command): void {
|
|||
issue
|
||||
.command("create")
|
||||
.description("Create an issue")
|
||||
.requiredOption("-C, --company-id <id>", "Company ID")
|
||||
.requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
|
||||
.requiredOption("--title <title>", "Issue title")
|
||||
.option("--description <text>", "Issue description")
|
||||
.option("--status <status>", "Issue status")
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ import {
|
|||
type PlannedIssueDocumentMerge,
|
||||
type PlannedIssueInsert,
|
||||
} from "./worktree-merge-history-lib.js";
|
||||
import { VOCAB } from "@paperclipai/branding";
|
||||
|
||||
type WorktreeInitOptions = {
|
||||
name?: string;
|
||||
|
|
@ -1538,7 +1539,7 @@ async function resolveMergeCompany(input: {
|
|||
}
|
||||
|
||||
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
|
||||
|
|
@ -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)")
|
||||
.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("--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("--apply", "Apply the import after previewing the plan", false)
|
||||
.option("--dry", "Preview only and do not import anything", false)
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ export async function startServer(): Promise<StartedServer> {
|
|||
|
||||
const LOCAL_BOARD_USER_ID = "local-board";
|
||||
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> {
|
||||
const now = new Date();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import type { CompanyPortabilityManifest } from "@paperclipai/shared";
|
||||
|
||||
const ROLE_LABELS: Record<string, string> = {
|
||||
ceo: "Project Manager", // [nexus] was: "CEO"
|
||||
ceo: "Project Manager", // [nexus] renamed from CEO
|
||||
cto: "CTO",
|
||||
cmo: "CMO",
|
||||
cfo: "CFO",
|
||||
|
|
|
|||
|
|
@ -2252,7 +2252,7 @@ function buildManifestFromPackageFiles(
|
|||
const companyName =
|
||||
asString(companyFrontmatter.name)
|
||||
?? opts?.sourceLabel?.companyName
|
||||
?? "Imported Company";
|
||||
?? "Imported Workspace";
|
||||
const companySlug =
|
||||
asString(companyFrontmatter.slug)
|
||||
?? normalizeAgentUrlKey(companyName)
|
||||
|
|
|
|||
|
|
@ -202,13 +202,13 @@ function OnboardingRoutePage() {
|
|||
const title = matchedCompany
|
||||
? `Add another agent to ${matchedCompany.name}`
|
||||
: companies.length > 0
|
||||
? "Create another company"
|
||||
: "Create your first company";
|
||||
? `Create another ${VOCAB.company.toLowerCase()}`
|
||||
: `Create your first ${VOCAB.company.toLowerCase()}`;
|
||||
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
|
||||
? "Run onboarding again to create another company and seed its first agent."
|
||||
: "Get started by creating a company and your first agent.";
|
||||
? `Run onboarding again to create another ${VOCAB.company.toLowerCase()} and seed its first agent.`
|
||||
: `Get started by creating a ${VOCAB.company.toLowerCase()} and your first agent.`;
|
||||
|
||||
return (
|
||||
<div className="mx-auto max-w-xl py-10">
|
||||
|
|
@ -290,12 +290,12 @@ function NoCompaniesStartPage() {
|
|||
return (
|
||||
<div className="mx-auto max-w-xl py-10">
|
||||
<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">
|
||||
Get started by creating a company.
|
||||
{`Get started by creating a ${VOCAB.company.toLowerCase()}.`}
|
||||
</p>
|
||||
<div className="mt-4">
|
||||
<Button onClick={() => openOnboarding()}>New Company</Button>
|
||||
<Button onClick={() => openOnboarding()}>{`New ${VOCAB.company}`}</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ export function OnboardingWizard() {
|
|||
): Promise<AdapterEnvironmentTestResult | null> {
|
||||
if (!createdCompanyId) {
|
||||
setAdapterEnvError(
|
||||
"Create or select a company before testing adapter environment."
|
||||
`Create or select a ${VOCAB.company.toLowerCase()} before testing adapter environment.`
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
|
@ -412,7 +412,7 @@ export function OnboardingWizard() {
|
|||
|
||||
setStep(2);
|
||||
} 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 {
|
||||
setLoading(false);
|
||||
}
|
||||
|
|
@ -720,7 +720,7 @@ export function OnboardingWizard() {
|
|||
</label>
|
||||
<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]"
|
||||
placeholder="What is this company trying to achieve?"
|
||||
placeholder={`What is this ${VOCAB.company.toLowerCase()} trying to achieve?`}
|
||||
value={companyGoal}
|
||||
onChange={(e) => setCompanyGoal(e.target.value)}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export function Sidebar() {
|
|||
/>
|
||||
)}
|
||||
<span className="flex-1 text-sm font-bold text-foreground truncate pl-1">
|
||||
{selectedCompany?.name ?? "Select company"}
|
||||
{selectedCompany?.name ?? `Select ${VOCAB.company.toLowerCase()}`}
|
||||
</span>
|
||||
<Button
|
||||
variant="ghost"
|
||||
|
|
|
|||
|
|
@ -2721,7 +2721,7 @@ function AgentSkillsTab({
|
|||
|
||||
{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="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">
|
||||
{desiredOnlyMissingSkills.join(", ")}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ export function CliAuthPage() {
|
|||
</div>
|
||||
{challenge.requestedCompanyName && (
|
||||
<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>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue