Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
refactor(slack): declutter the Slack connect UI (#4700)
Bohan Jiangd2bc85e01a35
diff --git a/apps/docs/content/docs/slack-bot-integration.ja.mdx b/apps/docs/content/docs/slack-bot-integration.ja.mdxindex 838bd5d439..930229ed55 100644--- a/apps/docs/content/docs/slack-bot-integration.ja.mdx+++ b/apps/docs/content/docs/slack-bot-integration.ja.mdx@@ -75,10 +75,6 @@ settings:**OAuth リダイレクト URL はありません**。BYO は OAuth を使わないからです。-<Callout type="warning">-スコープに `users:read` を残しておいてください。接続時に Multica は `bots.info` を呼び出し、bot トークンと app-level トークンが**同じ**アプリのものであることを確認します——この呼び出しには `users:read` が必要です。これがないと、**Connect** は失敗します。-</Callout>-<Callout type="info">Slack で特定の名前を表示したいですか? 作成前に `display_information.name` と `features.bot_user.display_name`(たとえばエージェントの名前に)を変更するか、あとで **App Home** で編集してください。Slack は Bot をその **bot display name** で表示しますが、これはアプリ名と異なる場合があります。</Callout>diff --git a/apps/docs/content/docs/slack-bot-integration.ko.mdx b/apps/docs/content/docs/slack-bot-integration.ko.mdxindex bc69299758..e3ccf3df88 100644--- a/apps/docs/content/docs/slack-bot-integration.ko.mdx+++ b/apps/docs/content/docs/slack-bot-integration.ko.mdx@@ -75,10 +75,6 @@ settings:**OAuth redirect URL은 없습니다.** BYO는 OAuth를 사용하지 않기 때문입니다.-<Callout type="warning">-스코프에 `users:read`를 유지하세요. 연결 시점에 Multica는 bot token과 app-level token이 **같은** 앱에서 왔는지 확인하기 위해 `bots.info`를 호출하는데 — 이 호출에는 `users:read`가 필요합니다. 이것이 없으면 **Connect**가 실패합니다.-</Callout>-<Callout type="info">Slack에서 특정 이름을 쓰고 싶나요? 생성하기 전에 `display_information.name`과 `features.bot_user.display_name`을 (예: 에이전트 이름으로) 변경하거나, 나중에 **App Home**에서 편집하세요. Slack은 봇을 **bot display name**으로 표시하며, 이는 앱 이름과 다를 수 있습니다.</Callout>diff --git a/apps/docs/content/docs/slack-bot-integration.mdx b/apps/docs/content/docs/slack-bot-integration.mdxindex 309736dcca..a214e157b7 100644--- a/apps/docs/content/docs/slack-bot-integration.mdx+++ b/apps/docs/content/docs/slack-bot-integration.mdx@@ -75,10 +75,6 @@ This manifest configures everything Multica needs, so you don't set anything byThere is **no OAuth redirect URL**, because BYO doesn't use OAuth.-<Callout type="warning">-Keep `users:read` in the scopes. At connect time Multica calls `bots.info` to confirm the bot token and app-level token come from the **same** app — that call needs `users:read`. Without it, **Connect** fails.-</Callout>-<Callout type="info">Want a specific name in Slack? Change `display_information.name` and `features.bot_user.display_name` (e.g. to your agent's name) before creating, or edit it later under **App Home**. Slack shows the bot by its **bot display name**, which can differ from the app name.</Callout>diff --git a/apps/docs/content/docs/slack-bot-integration.zh.mdx b/apps/docs/content/docs/slack-bot-integration.zh.mdxindex c084be5cfc..46788f82db 100644--- a/apps/docs/content/docs/slack-bot-integration.zh.mdx+++ b/apps/docs/content/docs/slack-bot-integration.zh.mdx@@ -75,10 +75,6 @@ settings:这里**没有 OAuth 重定向 URL**,因为 BYO 不使用 OAuth。-<Callout type="warning">-请保留 scopes 里的 `users:read`。连接时 Multica 会调用 `bots.info` 来确认 bot token 和 app-level token 来自**同一个** app——这个调用需要 `users:read`。没有它,**Connect** 会失败。-</Callout>-<Callout type="info">想在 Slack 里用一个特定的名字?在创建之前改 `display_information.name` 和 `features.bot_user.display_name`(比如改成你智能体的名字),或者之后在 **App Home** 里编辑。Slack 是按 Bot 的**显示名(bot display name)**来展示它的,这个名字可以和 app 名不一样。</Callout>diff --git a/packages/views/locales/en/settings.json b/packages/views/locales/en/settings.jsonindex acbd2e45ff..1b77a397c3 100644--- a/packages/views/locales/en/settings.json+++ b/packages/views/locales/en/settings.json@@ -302,7 +302,7 @@},"slack": {"section_title": "Slack",- "page_description": "Connect each Multica Agent to its own Slack bot. A workspace admin creates a Slack app and pastes its bot + app-level tokens; members can then DM the bot or @mention it in a channel, and start a message with /issue (e.g. \"@bot /issue Fix the login bug\") to spin up a new Multica issue.",+ "page_description": "Connect each Multica Agent to its own Slack bot. Members can DM the bot, @mention it in a channel, and type /issue to spin up a new Multica issue.","not_enabled_title": "Slack integration not enabled","not_enabled_description_prefix": "Set","not_enabled_description_suffix": "on the server to enable Slack bot installations.",@@ -333,14 +333,10 @@"agent_bot_manage_link": "Open in Slack","agent_bot_manage_tooltip": "Open this bot's Slack workspace.","byo_dialog_title": "Connect a Slack bot",- "byo_dialog_intro": "Create your own Slack app, install it to your workspace, then paste its two tokens below. You can connect a different app for each agent in the same workspace.","byo_video_cta": "Watch the setup walkthrough",- "byo_docs_link": "Read the setup guide",+ "byo_docs_link": "Step-by-step: connect your Multica agent to Slack","byo_bot_token_label": "Bot token (xoxb-)",- "byo_bot_token_hint": "Slack app → OAuth & Permissions → Bot User OAuth Token.","byo_app_token_label": "App-level token (xapp-)",- "byo_app_token_hint": "Slack app → Basic Information → App-Level Tokens (scope connections:write).",- "byo_scopes_hint": "Required bot scopes: app_mentions:read, channels:history, chat:write, groups:history, im:history, mpim:history, users:read.","byo_submit": "Connect","byo_submitting": "Connecting…","byo_cancel": "Cancel",diff --git a/packages/views/locales/ja/settings.json b/packages/views/locales/ja/settings.jsonindex ab3a209ca1..5df7494d8b 100644--- a/packages/views/locales/ja/settings.json+++ b/packages/views/locales/ja/settings.json@@ -302,7 +302,7 @@},"slack": {"section_title": "Slack",- "page_description": "各 Multica エージェントを専用の Slack ボットに接続します。ワークスペース管理者が Slack アプリを作成し、その bot トークンと app レベルトークンを貼り付けます。メンバーはボットに DM したりチャンネルで @メンションしたりでき、/issue で始まるメッセージ(例:「@bot /issue ログインの不具合を修正」)で新しい Multica issue を作成できます。",+ "page_description": "各 Multica エージェントを専用の Slack ボットに接続します。メンバーはボットに DM したり、チャンネルで @メンションしたり、/issue と入力して新しい Multica イシューを起こすことができます。","not_enabled_title": "Slack 連携が有効になっていません","not_enabled_description_prefix": "サーバーで","not_enabled_description_suffix": "を設定すると Slack ボットのインストールが有効になります。",@@ -333,14 +333,10 @@"agent_bot_manage_link": "Slack で開く","agent_bot_manage_tooltip": "このボットの Slack ワークスペースを開きます。","byo_dialog_title": "Slack ボットを接続",- "byo_dialog_intro": "自分の Slack アプリを作成してワークスペースにインストールし、その 2 つのトークンを下に貼り付けてください。同じワークスペース内でエージェントごとに別のアプリを接続できます。","byo_video_cta": "セットアップ手順の動画を見る",- "byo_docs_link": "セットアップガイドを読む",+ "byo_docs_link": "Step-by-step:Multica エージェントを Slack に接続する","byo_bot_token_label": "Bot トークン(xoxb-)",- "byo_bot_token_hint": "Slack アプリ → OAuth & Permissions → Bot User OAuth Token。","byo_app_token_label": "App レベルトークン(xapp-)",- "byo_app_token_hint": "Slack アプリ → Basic Information → App-Level Tokens(スコープ connections:write)。",- "byo_scopes_hint": "必要な Bot スコープ:app_mentions:read、channels:history、chat:write、groups:history、im:history、mpim:history、users:read。","byo_submit": "接続","byo_submitting": "接続中…","byo_cancel": "キャンセル",diff --git a/packages/views/locales/ko/settings.json b/packages/views/locales/ko/settings.jsonindex 3f0a0fdb01..103f58c6e7 100644--- a/packages/views/locales/ko/settings.json+++ b/packages/views/locales/ko/settings.json@@ -379,7 +379,7 @@},"slack": {"section_title": "Slack",- "page_description": "각 Multica 에이전트를 전용 Slack 봇에 연결합니다. 워크스페이스 관리자가 Slack 앱을 만들고 봇 토큰과 app 레벨 토큰을 붙여넣으면, 멤버는 봇에게 DM하거나 채널에서 @멘션할 수 있습니다. /issue로 시작하는 메시지(예: \"@bot /issue 로그인 버그 수정\")로 새 Multica 이슈를 만들 수 있어요.",+ "page_description": "각 Multica 에이전트를 전용 Slack 봇에 연결하세요. 멤버는 봇과 1:1로 대화하거나, 채널에서 @ 멘션하거나, /issue 를 입력해 새 Multica 이슈를 만들 수 있습니다.","not_enabled_title": "Slack 연동이 활성화되지 않았어요","not_enabled_description_prefix": "서버에서","not_enabled_description_suffix": "를 설정하면 Slack 봇 설치가 활성화됩니다.",@@ -410,14 +410,10 @@"agent_bot_manage_link": "Slack에서 열기","agent_bot_manage_tooltip": "이 봇의 Slack 워크스페이스를 엽니다.","byo_dialog_title": "Slack 봇 연결",- "byo_dialog_intro": "직접 만든 Slack 앱을 워크스페이스에 설치한 뒤, 두 개의 토큰을 아래에 붙여넣으세요. 같은 워크스페이스에서 에이전트마다 다른 앱을 연결할 수 있습니다.","byo_video_cta": "설정 안내 영상 보기",- "byo_docs_link": "설정 가이드 읽기",+ "byo_docs_link": "Step-by-step: Multica 에이전트를 Slack에 연결하기","byo_bot_token_label": "Bot 토큰(xoxb-)",- "byo_bot_token_hint": "Slack 앱 → OAuth & Permissions → Bot User OAuth Token.","byo_app_token_label": "App 레벨 토큰(xapp-)",- "byo_app_token_hint": "Slack 앱 → Basic Information → App-Level Tokens(스코프 connections:write).",- "byo_scopes_hint": "필요한 Bot 스코프: app_mentions:read, channels:history, chat:write, groups:history, im:history, mpim:history, users:read.","byo_submit": "연결","byo_submitting": "연결 중…","byo_cancel": "취소",diff --git a/packages/views/locales/zh-Hans/settings.json b/packages/views/locales/zh-Hans/settings.jsonindex 20c44c0491..1904535751 100644--- a/packages/views/locales/zh-Hans/settings.json+++ b/packages/views/locales/zh-Hans/settings.json@@ -302,7 +302,7 @@},"slack": {"section_title": "Slack",- "page_description": "把每个 Multica Agent 连接到它自己的 Slack 机器人。工作区管理员创建一个 Slack app 并粘贴它的 bot 和 app-level token;成员之后即可私聊机器人,或在频道中 @ 它,并以 /issue 开头发消息(例如「@机器人 /issue 修复登录问题」)来创建新的 Multica issue。",+ "page_description": "将每个 Multica 智能体连接到专属的 Slack 机器人。成员可私聊机器人、在频道中 @ 它,或输入 /issue 直接创建 Multica issue。","not_enabled_title": "Slack 集成未启用","not_enabled_description_prefix": "在服务器上设置","not_enabled_description_suffix": "以启用 Slack 机器人安装。",@@ -333,14 +333,10 @@"agent_bot_manage_link": "在 Slack 中打开","agent_bot_manage_tooltip": "打开此机器人所在的 Slack 工作区。","byo_dialog_title": "连接 Slack 机器人",- "byo_dialog_intro": "创建你自己的 Slack app,安装到你的工作区,然后把它的两个 token 粘贴到下面。同一个工作区里,每个 agent 可以连接不同的 app。","byo_video_cta": "观看配置教程视频",- "byo_docs_link": "查看配置指南",+ "byo_docs_link": "Step-by-step:把你的 Multica 智能体连接到 Slack","byo_bot_token_label": "Bot token(xoxb-)",- "byo_bot_token_hint": "Slack app → OAuth & Permissions → Bot User OAuth Token。","byo_app_token_label": "App-level token(xapp-)",- "byo_app_token_hint": "Slack app → Basic Information → App-Level Tokens(scope 选 connections:write)。",- "byo_scopes_hint": "需要的 Bot scopes:app_mentions:read、channels:history、chat:write、groups:history、im:history、mpim:history、users:read。","byo_submit": "连接","byo_submitting": "连接中…","byo_cancel": "取消",diff --git a/packages/views/settings/components/slack-tab.tsx b/packages/views/settings/components/slack-tab.tsxindex e1998ac955..2237246c03 100644--- a/packages/views/settings/components/slack-tab.tsx+++ b/packages/views/settings/components/slack-tab.tsx@@ -10,7 +10,6 @@ import { Card, CardContent } from "@multica/ui/components/ui/card";import {Dialog,DialogContent,- DialogDescription,DialogFooter,DialogHeader,DialogTitle,@@ -385,18 +384,15 @@ export function SlackAgentBindButton({<DialogContent className="sm:max-w-lg" data-testid="slack-byo-dialog"><DialogHeader><DialogTitle>{t(($) => $.slack.byo_dialog_title)}</DialogTitle>- <DialogDescription>- {t(($) => $.slack.byo_dialog_intro)}- </DialogDescription></DialogHeader>{SLACK_BYO_VIDEO_URL ? (<buttontype="button"onClick={() => openExternal(SLACK_BYO_VIDEO_URL)}- className="inline-flex w-fit items-center gap-1.5 text-xs font-medium text-primary underline-offset-2 hover:underline"+ className="inline-flex w-fit items-center gap-2 text-sm font-medium text-primary underline-offset-2 hover:underline">- <ExternalLink className="h-3.5 w-3.5" />+ <ExternalLink className="h-4 w-4" />{t(($) => $.slack.byo_video_cta)}</button>) : null}@@ -404,17 +400,13 @@ export function SlackAgentBindButton({<buttontype="button"onClick={() => openExternal(slackDocsUrl(i18n.language))}- className="inline-flex w-fit items-center gap-1.5 text-xs font-medium text-primary underline-offset-2 hover:underline"+ className="inline-flex w-fit items-center gap-2 text-sm font-medium text-primary underline-offset-2 hover:underline"data-testid="slack-byo-docs-link">- <ExternalLink className="h-3.5 w-3.5" />+ <ExternalLink className="h-4 w-4" />{t(($) => $.slack.byo_docs_link)}</button>- <p className="rounded-md bg-muted px-3 py-2 text-[11px] text-muted-foreground">- {t(($) => $.slack.byo_scopes_hint)}- </p>-<div className="space-y-4"><div className="space-y-1.5"><Label htmlFor="slack-byo-bot-token">@@ -430,9 +422,6 @@ export function SlackAgentBindButton({spellCheck={false}disabled={submitting}/>- <p className="text-[11px] text-muted-foreground">- {t(($) => $.slack.byo_bot_token_hint)}- </p></div><div className="space-y-1.5">@@ -449,9 +438,6 @@ export function SlackAgentBindButton({spellCheck={false}disabled={submitting}/>- <p className="text-[11px] text-muted-foreground">- {t(($) => $.slack.byo_app_token_hint)}- </p></div></div>