Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Use generic AI agent wording on Metabot customization page (#73324)

Andrei Chernykh94341692eba1
diff --git a/e2e/test/scenarios/metabot/ai-controls.cy.spec.ts b/e2e/test/scenarios/metabot/ai-controls.cy.spec.ts
index 08b653895d3..073f28167f2 100644
--- a/e2e/test/scenarios/metabot/ai-controls.cy.spec.ts
+++ b/e2e/test/scenarios/metabot/ai-controls.cy.spec.ts
@@ -124,7 +124,7 @@ describe("AI Controls > Metabot access and customization", () => {
cy.findByRole("heading", { name: "Customization", level: 1 }).should(
"be.visible",
);
- cy.findByLabelText("Metabot's name")
+ cy.findByLabelText("AI agent's name")
.should("be.visible")
.clear()
.type("HAL 9000");
@@ -134,7 +134,7 @@ describe("AI Controls > Metabot access and customization", () => {
// Reload and verify persistence
cy.reload();
- cy.findByLabelText("Metabot's name").should("have.value", "HAL 9000");
+ cy.findByLabelText("AI agent's name").should("have.value", "HAL 9000");
});
it("should upload a custom Metabot icon and show the illustrations section", () => {
@@ -142,7 +142,7 @@ describe("AI Controls > Metabot access and customization", () => {
cy.visit("/admin/metabot/1/customization");
- H.main().findByText("Metabot's icon").should("be.visible");
+ H.main().findByText("AI agent's icon").should("be.visible");
cy.findByRole("button", { name: "Upload a custom icon" }).should(
"be.visible",
);
diff --git a/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotCustomizationPage.tsx b/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotCustomizationPage.tsx
index a8a7e972130..c8e81ad72d9 100644
--- a/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotCustomizationPage.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotCustomizationPage.tsx
@@ -4,28 +4,31 @@ import {
SettingsPageWrapper,
SettingsSection,
} from "metabase/admin/components/SettingsSection";
+import { useSelector } from "metabase/redux";
+import { getApplicationName } from "metabase/selectors/whitelabel";
import { TextInput } from "metabase/ui";
import { useAdminSettingWithDebouncedInput } from "metabase-enterprise/ai-controls/hooks";
import { MetabotIconField } from "./MetabotIconField";
export function MetabotCustomizationPage() {
+ const applicationName = useSelector(getApplicationName);
const { handleInputChange, inputValue: nameInput } =
useAdminSettingWithDebouncedInput<string | null>("metabot-name");
return (
<SettingsPageWrapper title={t`Customization`} mt="sm">
<SettingsSection
- description={t`Customize how Metabot appears to users.`}
+ description={t`Customize how ${applicationName}'s AI agent appears to users.`}
title={t`Identity`}
>
<TextInput
- label={t`Metabot's name`}
+ label={t`AI agent's name`}
placeholder={t`Metabot`}
mb="sm"
value={nameInput || ""}
onChange={(e) => handleInputChange(e.target.value)}
- error={nameInput ? undefined : t`Metabot's name is required`}
+ error={nameInput ? undefined : t`AI agent's name is required`}
/>
<MetabotIconField />
</SettingsSection>
diff --git a/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotCustomizationPage.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotCustomizationPage.unit.spec.tsx
index 903956a75ff..dce9aea356d 100644
--- a/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotCustomizationPage.unit.spec.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotCustomizationPage.unit.spec.tsx
@@ -41,7 +41,7 @@ describe("MetabotCustomizationPage", () => {
it("shows default icon state when no custom icon is set", async () => {
setup({ metabotIcon: "metabot" });
- await screen.findByText("Metabot's icon");
+ await screen.findByText("AI agent's icon");
expect(
screen.queryByRole("button", { name: /Remove custom icon/ }),
).not.toBeInTheDocument();
@@ -51,7 +51,7 @@ describe("MetabotCustomizationPage", () => {
it("shows the remove button and illustrations toggle when a custom icon is set", async () => {
setup({ metabotIcon: "data:image/png;base64,abc123" });
- await screen.findByText("Metabot's icon");
+ await screen.findByText("AI agent's icon");
expect(
screen.getByRole("button", { name: /Remove custom icon/ }),
).toBeInTheDocument();
diff --git a/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotIconField.tsx b/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotIconField.tsx
index 5c47994ed7f..06f6fe3dd04 100644
--- a/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotIconField.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/ai-controls/pages/MetabotCustomizationPage/MetabotIconField.tsx
@@ -80,10 +80,10 @@ export function MetabotIconField() {
return (
<Stack gap={0}>
<Text lh="lg" fz="md" mb="xs" fw="bold">
- {t`Metabot's icon`}
+ {t`AI agent's icon`}
</Text>
<Text fz="md" c="text-secondary" lh="lg">
- {t`Upload a custom icon for Metabot. For best results, use an SVG or PNG with a transparent background.`}
+ {t`Upload a custom icon for the AI agent. For best results, use an SVG or PNG with a transparent background.`}
</Text>
{iconError && (
<Text fz="sm" c="error" mt="xs">