From bfd65828a631cea4ae9e65ebd83dfaaf5dbcc4d1 Mon Sep 17 00:00:00 2001 From: viettranx Date: Thu, 2 Apr 2026 15:18:06 +0700 Subject: [PATCH] feat(web): add merge hint to CLI and MCP user credentials dialogs Both dialogs now show an amber callout explaining that chat users (Telegram, Discord, etc.) must be merged into a tenant user via Contacts page before they can have per-user credentials. i18n: en/vi/zh for both cli-credentials and mcp namespaces. --- ui/web/src/i18n/locales/en/cli-credentials.json | 3 ++- ui/web/src/i18n/locales/en/mcp.json | 3 ++- ui/web/src/i18n/locales/vi/cli-credentials.json | 3 ++- ui/web/src/i18n/locales/vi/mcp.json | 3 ++- ui/web/src/i18n/locales/zh/cli-credentials.json | 3 ++- ui/web/src/i18n/locales/zh/mcp.json | 3 ++- .../src/pages/cli-credentials/cli-user-credentials-dialog.tsx | 1 + ui/web/src/pages/mcp/mcp-user-credentials-dialog.tsx | 3 ++- 8 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ui/web/src/i18n/locales/en/cli-credentials.json b/ui/web/src/i18n/locales/en/cli-credentials.json index 4a0b0419..282766bc 100644 --- a/ui/web/src/i18n/locales/en/cli-credentials.json +++ b/ui/web/src/i18n/locales/en/cli-credentials.json @@ -81,6 +81,7 @@ "saveFailed": "Failed to save user credentials", "deleted": "User credentials deleted", "deleteFailed": "Failed to delete user credentials", - "envRequired": "At least one environment variable is required" + "envRequired": "At least one environment variable is required", + "mergeHint": "Chat users (Telegram, Discord, etc.) must be merged into a tenant user first via Contacts page before they can have per-user credentials." } } diff --git a/ui/web/src/i18n/locales/en/mcp.json b/ui/web/src/i18n/locales/en/mcp.json index 8c7857d9..f1a9babb 100644 --- a/ui/web/src/i18n/locales/en/mcp.json +++ b/ui/web/src/i18n/locales/en/mcp.json @@ -127,6 +127,7 @@ "addHeader": "Add Header", "addEnv": "Add Variable", "saveFailed": "Failed to save credentials", - "deleteFailed": "Failed to delete credentials" + "deleteFailed": "Failed to delete credentials", + "mergeHint": "Chat users (Telegram, Discord, etc.) must be merged into a tenant user first via Contacts page before they can have per-user credentials." } } diff --git a/ui/web/src/i18n/locales/vi/cli-credentials.json b/ui/web/src/i18n/locales/vi/cli-credentials.json index 056140e8..ae341042 100644 --- a/ui/web/src/i18n/locales/vi/cli-credentials.json +++ b/ui/web/src/i18n/locales/vi/cli-credentials.json @@ -81,6 +81,7 @@ "saveFailed": "Không thể lưu thông tin người dùng", "deleted": "Đã xóa thông tin người dùng", "deleteFailed": "Không thể xóa thông tin người dùng", - "envRequired": "Cần ít nhất một biến môi trường" + "envRequired": "Cần ít nhất một biến môi trường", + "mergeHint": "Người dùng chat (Telegram, Discord...) cần được gộp vào tenant user qua trang Contacts trước khi có thể thiết lập credentials riêng." } } diff --git a/ui/web/src/i18n/locales/vi/mcp.json b/ui/web/src/i18n/locales/vi/mcp.json index 1dcd8c95..3b4b311d 100644 --- a/ui/web/src/i18n/locales/vi/mcp.json +++ b/ui/web/src/i18n/locales/vi/mcp.json @@ -127,6 +127,7 @@ "addHeader": "Thêm Header", "addEnv": "Thêm biến", "saveFailed": "Lưu credentials thất bại", - "deleteFailed": "Xóa credentials thất bại" + "deleteFailed": "Xóa credentials thất bại", + "mergeHint": "Người dùng chat (Telegram, Discord...) cần được gộp vào tenant user qua trang Contacts trước khi có thể thiết lập credentials riêng." } } diff --git a/ui/web/src/i18n/locales/zh/cli-credentials.json b/ui/web/src/i18n/locales/zh/cli-credentials.json index 59beadc0..9a5eeb2b 100644 --- a/ui/web/src/i18n/locales/zh/cli-credentials.json +++ b/ui/web/src/i18n/locales/zh/cli-credentials.json @@ -81,6 +81,7 @@ "saveFailed": "保存用户凭证失败", "deleted": "用户凭证已删除", "deleteFailed": "删除用户凭证失败", - "envRequired": "至少需要一个环境变量" + "envRequired": "至少需要一个环境变量", + "mergeHint": "聊天用户(Telegram、Discord 等)需要先通过联系人页面合并为租户用户,才能设置独立凭证。" } } diff --git a/ui/web/src/i18n/locales/zh/mcp.json b/ui/web/src/i18n/locales/zh/mcp.json index 41d2db12..5e0ce950 100644 --- a/ui/web/src/i18n/locales/zh/mcp.json +++ b/ui/web/src/i18n/locales/zh/mcp.json @@ -127,6 +127,7 @@ "addHeader": "添加 Header", "addEnv": "添加变量", "saveFailed": "保存凭据失败", - "deleteFailed": "删除凭据失败" + "deleteFailed": "删除凭据失败", + "mergeHint": "聊天用户(Telegram、Discord 等)需要先通过联系人页面合并为租户用户,才能设置独立凭证。" } } diff --git a/ui/web/src/pages/cli-credentials/cli-user-credentials-dialog.tsx b/ui/web/src/pages/cli-credentials/cli-user-credentials-dialog.tsx index 0537c37c..906bd06e 100644 --- a/ui/web/src/pages/cli-credentials/cli-user-credentials-dialog.tsx +++ b/ui/web/src/pages/cli-credentials/cli-user-credentials-dialog.tsx @@ -240,6 +240,7 @@ export function CLIUserCredentialsDialog({ open, onOpenChange, binary }: CLIUser source="tenant_user" allowCustom /> +

{t("userCredentials.mergeHint")}

diff --git a/ui/web/src/pages/mcp/mcp-user-credentials-dialog.tsx b/ui/web/src/pages/mcp/mcp-user-credentials-dialog.tsx index f513784d..cdb9fab0 100644 --- a/ui/web/src/pages/mcp/mcp-user-credentials-dialog.tsx +++ b/ui/web/src/pages/mcp/mcp-user-credentials-dialog.tsx @@ -147,7 +147,8 @@ export function MCPUserCredentialsDialog({ onChange={setSelectedUserId} placeholder={t("userCredentials.selectUser")} source="tenant_user" - /> + /> +

{t("userCredentials.mergeHint")}

)}