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
2 changes: 2 additions & 0 deletions apps/web/src/command-palette-actions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ describe("ACTION_COMMANDS", () => {
test("new-workbench and new-agent speak consumer language, not mint", () => {
const workbench = ACTION_COMMANDS.find((c) => c.id === "new-workbench");
const agent = ACTION_COMMANDS.find((c) => c.id === "new-agent");
expect(workbench?.title).toBe("New workbench");
expect(agent?.title).toBe("New workbench");
expect(workbench?.subtitle).toBe("Start a new workbench");
expect(agent?.subtitle).toBe("Start a new workbench");
expect(workbench?.subtitle.toLowerCase()).not.toContain("mint");
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/command-palette-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
// never hops to `/routines` first the way this used to.

import { createPendingDialogRequest } from "@corbits/shell-layout";
import { CHAT_STRINGS } from "@corbits/chat-ui";
import { WORKBENCH_PATH_PREFIX } from "./workbench-path";
import { NEW_WORKBENCH_PATH } from "./routes";
import { listAgentDefinitions } from "./agents-api";
Expand Down Expand Up @@ -97,12 +98,12 @@ export type ActionCommand = {
export const ACTION_COMMANDS: readonly ActionCommand[] = [
{
id: "new-workbench",
title: "New workbench",
title: CHAT_STRINGS.newWorkbenchAction,
subtitle: "Start a new workbench",
},
{
id: "new-agent",
title: "New workbench",
title: CHAT_STRINGS.newWorkbenchAction,
subtitle: "Start a new workbench",
},
{
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/pages/mission-control-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { useMemo, useState } from "react";
import { useQueryClient } from "@tanstack/react-query";

import { formatUsd } from "@corbits/insights/client";
import type { Workbench } from "@corbits/chat-ui";
import { CHAT_STRINGS, type Workbench } from "@corbits/chat-ui";

import {
approveApproval,
Expand Down Expand Up @@ -278,7 +278,7 @@ export function MissionControlRoute({
size="sm"
onClick={() => navigate(NEW_WORKBENCH_PATH)}
>
<Plus /> New bench
<Plus /> {CHAT_STRINGS.newWorkbenchAction}
</Button>
}
/>
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/pages/new-workbench-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
} from "@corbits/icons";
import {
ChatApiError,
CHAT_STRINGS,
describeChatError,
WorkbenchLoadingState,
} from "@corbits/chat-ui";
Expand Down Expand Up @@ -216,7 +217,7 @@ export function NewWorkbenchPickerRoute() {
return (
<div className="flex h-full min-h-0 flex-col">
<StageTopBar
crumbs={[{ label: "New workbench" }]}
crumbs={[{ label: CHAT_STRINGS.newWorkbenchAction }]}
actions={
<Button
type="button"
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
SlidersHorizontal,
SquaresFour,
} from "@corbits/icons";
import { CHAT_STRINGS } from "@corbits/chat-ui";
import type { Slug } from "@corbits/slug";
import { lazy, useEffect, type ReactElement, type ReactNode } from "react";

Expand Down Expand Up @@ -253,7 +254,7 @@ function InboxRedirect({
export const APP_ROUTES: readonly AppRoute[] = [
{
path: "/",
label: "New Workbench",
label: CHAT_STRINGS.newWorkbenchAction,
icon: <ChatCircle />,
render: () => <HomeRoute />,
hasStageTopBar: false,
Expand All @@ -268,7 +269,7 @@ export const APP_ROUTES: readonly AppRoute[] = [
},
{
path: NEW_WORKBENCH_PATH,
label: "New workbench",
label: CHAT_STRINGS.newWorkbenchAction,
icon: <ChatCircle />,
render: () => <NewWorkbenchPickerRoute />,
},
Expand Down
10 changes: 7 additions & 3 deletions apps/web/src/shell/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ import {
import type { CSSProperties } from "react";
import { useMemo } from "react";

import { AVATAR_IDENTITY_CLASS, generatedAvatarStyle } from "@corbits/chat-ui";
import {
AVATAR_IDENTITY_CLASS,
CHAT_STRINGS,
generatedAvatarStyle,
} from "@corbits/chat-ui";
import {
createInsightsWindow,
usageChromeLabel,
Expand Down Expand Up @@ -150,8 +154,8 @@ export function Sidebar({
<Button
variant="ghost"
size="sm"
aria-label="New workbench"
title="New workbench"
aria-label={CHAT_STRINGS.newWorkbenchAction}
title={CHAT_STRINGS.newWorkbenchAction}
onClick={() => onNavigate(NEW_WORKBENCH_PATH)}
>
<Plus />
Expand Down
2 changes: 2 additions & 0 deletions apps/web/test/mission-control-page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ describe("MissionControlRoute", () => {
});
}
expect(container.textContent).toContain("Mission Control");
expect(container.textContent).toContain("New workbench");
expect(container.textContent).not.toContain("New bench");
expect(container.textContent).toContain("Nothing waiting on you");
expect(container.textContent).toContain("Nothing running right now");
expect(container.textContent).toContain("Nothing recent yet.");
Expand Down
2 changes: 1 addition & 1 deletion apps/web/test/routes.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ describe("routes render", () => {
const markup = await renderApp(route.path);
expect(markup).toContain('data-testid="shell-sidebar"');
if (route.path === "/") {
expect(stagePageTitle(markup)).toBe("New Workbench");
expect(stagePageTitle(markup)).toBe("New workbench");
return;
}
if (route.path === "/w") {
Expand Down
10 changes: 7 additions & 3 deletions packages/chat-ui/src/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ function joinWithAnd(names: readonly string[]): string {
return `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]}`;
}

/** Canonical create-workbench CTA and untitled-mint label (CL-6767). */
const NEW_WORKBENCH_LABEL = "New workbench";

export const CHAT_STRINGS = {
workbenchesSectionLabel: "Pinned",
chatsSectionLabel: "Workbenches",
Expand All @@ -28,10 +31,11 @@ export const CHAT_STRINGS = {
/** @deprecated Prefer Mission Control / New workbench recovery (CL-6796). */
workbenchNotFoundAction: "Back to workbenches",
workbenchNotFoundMissionControlAction: "Mission Control",
workbenchNotFoundNewWorkbenchAction: "New workbench",
workbenchNotFoundNewWorkbenchAction: NEW_WORKBENCH_LABEL,
/** Create-workbench CTA on every mint surface (CL-6767). */
newWorkbenchAction: NEW_WORKBENCH_LABEL,
composerPlaceholder: "Send a message… use @ to mention an agent",
composerPlaceholderChat: (name: string) => `Message ${name}…`,

composerSend: "Send",
composerSending: "Sending…",
composerKeyboardHint: "Enter to send",
Expand Down Expand Up @@ -78,7 +82,7 @@ export const CHAT_STRINGS = {
composerHelpClose: "Close",
runRoutineUnavailable: "Open Routines to create one",
unnamedWorkbench: "Untitled conversation",
newWorkbenchTitle: "New workbench",
newWorkbenchTitle: NEW_WORKBENCH_LABEL,
unnamedRun: "Untitled agent",
fallbackPartLabel: (kind: string) => `[${kind}]`,
senderYou: "You",
Expand Down
Loading