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
1 change: 1 addition & 0 deletions apps/web/src/shell/workbench-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
6 changes: 6 additions & 0 deletions packages/chat-ui/src/strings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions packages/chat-ui/src/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down
Loading