diff --git a/apps/web/src/shell/workbench-list.tsx b/apps/web/src/shell/workbench-list.tsx index fcba53bfd..f6566a7e5 100644 --- a/apps/web/src/shell/workbench-list.tsx +++ b/apps/web/src/shell/workbench-list.tsx @@ -301,6 +301,7 @@ function WorkbenchRow({ // Revert the optimistic title on failure; the list will refetch on // the next scope selection and reconcile either way. setTitle(workbench.title); + toast(CHAT_STRINGS.workbenchRenameError); } } diff --git a/packages/chat-ui/src/strings.test.ts b/packages/chat-ui/src/strings.test.ts index ea2938039..aa1d4ffa3 100644 --- a/packages/chat-ui/src/strings.test.ts +++ b/packages/chat-ui/src/strings.test.ts @@ -15,6 +15,12 @@ describe("toast confirmation copy", () => { ); }); + test("rename failure tells the person to try again", () => { + expect(CHAT_STRINGS.workbenchRenameError).toBe( + "Couldn't rename that workbench — try again.", + ); + }); + test("pin copy follows the state the workbench just entered", () => { expect(CHAT_STRINGS.workbenchPinnedToast(true, "Deploy notes")).toBe( "Pinned Deploy notes", diff --git a/packages/chat-ui/src/strings.ts b/packages/chat-ui/src/strings.ts index 604819b1a..91ff9f072 100644 --- a/packages/chat-ui/src/strings.ts +++ b/packages/chat-ui/src/strings.ts @@ -133,6 +133,7 @@ export const CHAT_STRINGS = { forkThreadOriginBanner: "Forked from a message in", workbenchCreatedToast: (title: string) => `Created · ${title}`, workbenchRenamedToast: (title: string) => `Renamed to ${title}`, + workbenchRenameError: "Couldn't rename that workbench — try again.", workbenchPinnedToast: (pinned: boolean, title: string) => pinned ? `Pinned ${title}` : `Unpinned ${title}`, workbenchPinToggleError: (pinned: boolean) =>