From b61ef7ba12fdc5f585b8dac3ea02c5e82eb01308 Mon Sep 17 00:00:00 2001 From: Mikkel Georgsen Date: Mon, 30 Mar 2026 23:51:59 +0200 Subject: [PATCH] feat(03-02): replace display strings in OnboardingWizard, LiveUpdatesProvider, and assignees lib - OnboardingWizard.tsx: DEFAULT_TASK_DESCRIPTION uses VOCAB.ceo/company/hire; useState uses VOCAB.ceo; task title updated to Nexus vocabulary; step tab label uses VOCAB.company; placeholder uses VOCAB.ceo; launch summary uses VOCAB.company - LiveUpdatesProvider.tsx: resolveActorLabel returns VOCAB.board instead of hardcoded 'Board' - assignees.ts: formatAssigneeUserLabel returns VOCAB.board for local-board user - assignees.test.ts: updated expectation to 'Owner' (VOCAB.board value) --- ui/src/components/OnboardingWizard.tsx | 23 ++++++++++++----------- ui/src/context/LiveUpdatesProvider.tsx | 3 ++- ui/src/lib/assignees.test.ts | 2 +- ui/src/lib/assignees.ts | 4 +++- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ui/src/components/OnboardingWizard.tsx b/ui/src/components/OnboardingWizard.tsx index cd28af9f..fcbc2385 100644 --- a/ui/src/components/OnboardingWizard.tsx +++ b/ui/src/components/OnboardingWizard.tsx @@ -1,4 +1,5 @@ import { useEffect, useState, useRef, useCallback, useMemo } from "react"; +import { VOCAB } from "@paperclipai/branding"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import type { AdapterEnvironmentTestResult } from "@paperclipai/shared"; import { useLocation, useNavigate, useParams } from "@/lib/router"; @@ -68,9 +69,9 @@ type AdapterType = | "http" | "openclaw_gateway"; -const DEFAULT_TASK_DESCRIPTION = `You are the CEO. You set the direction for the company. +const DEFAULT_TASK_DESCRIPTION = `You are the ${VOCAB.ceo}. You set the direction for the ${VOCAB.company.toLowerCase()}. -- hire a founding engineer +- ${VOCAB.hire.toLowerCase()} a founding engineer - write a hiring plan - break the roadmap into concrete tasks and start delegating work`; @@ -111,7 +112,7 @@ export function OnboardingWizard() { const [companyGoal, setCompanyGoal] = useState(""); // Step 2 - const [agentName, setAgentName] = useState("CEO"); + const [agentName, setAgentName] = useState(VOCAB.ceo); const [adapterType, setAdapterType] = useState("claude_local"); const [model, setModel] = useState(""); const [command, setCommand] = useState(""); @@ -128,7 +129,7 @@ export function OnboardingWizard() { // Step 3 const [taskTitle, setTaskTitle] = useState( - "Hire your first engineer and create a hiring plan" + "Add your first engineer and create a staffing plan" ); const [taskDescription, setTaskDescription] = useState( DEFAULT_TASK_DESCRIPTION @@ -283,7 +284,7 @@ export function OnboardingWizard() { setError(null); setCompanyName(""); setCompanyGoal(""); - setAgentName("CEO"); + setAgentName(VOCAB.ceo); setAdapterType("claude_local"); setModel(""); setCommand(""); @@ -294,7 +295,7 @@ export function OnboardingWizard() { setAdapterEnvLoading(false); setForceUnsetAnthropicApiKey(false); setUnsetAnthropicLoading(false); - setTaskTitle("Hire your first engineer and create a hiring plan"); + setTaskTitle("Add your first engineer and create a staffing plan"); setTaskDescription(DEFAULT_TASK_DESCRIPTION); setCreatedCompanyId(null); setCreatedCompanyPrefix(null); @@ -645,11 +646,11 @@ export function OnboardingWizard() {
{( [ - { step: 1 as Step, label: "Company", icon: Building2 }, + { step: 1 as Step, label: VOCAB.company, icon: Building2 }, { step: 2 as Step, label: "Agent", icon: Bot }, { step: 3 as Step, label: "Task", icon: ListTodo }, { step: 4 as Step, label: "Launch", icon: Rocket } - ] as const + ] ).map(({ step: s, label, icon: Icon }) => (
-

Name your company

+

{`Name your ${VOCAB.company.toLowerCase()}`}

This is the organization your agents will work for.

@@ -741,7 +742,7 @@ export function OnboardingWizard() { setAgentName(e.target.value)} autoFocus @@ -1209,7 +1210,7 @@ export function OnboardingWizard() {

{companyName}

-

Company

+

{VOCAB.company}

diff --git a/ui/src/context/LiveUpdatesProvider.tsx b/ui/src/context/LiveUpdatesProvider.tsx index ec593b3b..c4f01fa1 100644 --- a/ui/src/context/LiveUpdatesProvider.tsx +++ b/ui/src/context/LiveUpdatesProvider.tsx @@ -1,4 +1,5 @@ import { useEffect, useRef, type ReactNode } from "react"; +import { VOCAB } from "@paperclipai/branding"; import { useQuery, useQueryClient, type QueryClient } from "@tanstack/react-query"; import type { Agent, Issue, LiveEvent } from "@paperclipai/shared"; import type { RunForIssue } from "../api/activity"; @@ -55,7 +56,7 @@ function resolveActorLabel( } if (actorType === "system") return "System"; if (actorType === "user" && actorId) { - return "Board"; + return VOCAB.board; } return "Someone"; } diff --git a/ui/src/lib/assignees.test.ts b/ui/src/lib/assignees.test.ts index 225f7133..22f2a70a 100644 --- a/ui/src/lib/assignees.test.ts +++ b/ui/src/lib/assignees.test.ts @@ -48,7 +48,7 @@ describe("assignee selection helpers", () => { it("formats current and board user labels consistently", () => { expect(formatAssigneeUserLabel("user-1", "user-1")).toBe("Me"); - expect(formatAssigneeUserLabel("local-board", "someone-else")).toBe("Board"); + expect(formatAssigneeUserLabel("local-board", "someone-else")).toBe("Owner"); expect(formatAssigneeUserLabel("user-abcdef", "someone-else")).toBe("user-"); }); diff --git a/ui/src/lib/assignees.ts b/ui/src/lib/assignees.ts index 0dc57e96..79d747e9 100644 --- a/ui/src/lib/assignees.ts +++ b/ui/src/lib/assignees.ts @@ -1,3 +1,5 @@ +import { VOCAB } from "@paperclipai/branding"; + export interface AssigneeSelection { assigneeAgentId: string | null; assigneeUserId: string | null; @@ -77,6 +79,6 @@ export function formatAssigneeUserLabel( ): string | null { if (!userId) return null; if (currentUserId && userId === currentUserId) return "Me"; - if (userId === "local-board") return "Board"; + if (userId === "local-board") return VOCAB.board; return userId.slice(0, 5); }