Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(settings): clarify integration channel sections (#6807)

YYClaw2b3920a98ea5
diff --git a/packages/views/settings/components/dingtalk-tab.tsx b/packages/views/settings/components/dingtalk-tab.tsx
index d5929396e9..506ab64518 100644
--- a/packages/views/settings/components/dingtalk-tab.tsx
+++ b/packages/views/settings/components/dingtalk-tab.tsx
@@ -94,12 +94,6 @@ export function DingTalkTab() {
return (
<div className="space-y-8">
- <section className="space-y-1">
- <p className="text-body text-muted-foreground">
- {t(($) => $.dingtalk.page_description)}
- </p>
- </section>
-
{!configured ? (
<Card>
<CardContent className="space-y-2">
diff --git a/packages/views/settings/components/integration-channel-icon.tsx b/packages/views/settings/components/integration-channel-icon.tsx
new file mode 100644
index 0000000000..67401c0e09
--- /dev/null
+++ b/packages/views/settings/components/integration-channel-icon.tsx
@@ -0,0 +1,24 @@
+import { MessagesSquare, Webhook } from "lucide-react";
+import { DingTalkMark } from "./dingtalk-mark";
+import { WecomMark } from "./wecom-mark";
+
+type IntegrationChannel = "lark" | "slack" | "dingtalk" | "wecom";
+
+export function IntegrationChannelIcon({ channel }: { channel: IntegrationChannel }) {
+ const icon = {
+ lark: <Webhook className="h-4 w-4" />,
+ slack: <MessagesSquare className="h-4 w-4" />,
+ dingtalk: <DingTalkMark className="h-5 w-5" />,
+ wecom: <WecomMark className="h-4 w-4" />,
+ }[channel];
+
+ return (
+ <span
+ aria-hidden="true"
+ data-testid={`integration-channel-icon-${channel}`}
+ className="flex size-5 shrink-0 items-center justify-center text-muted-foreground"
+ >
+ {icon}
+ </span>
+ );
+}
diff --git a/packages/views/settings/components/integrations-tab.test.tsx b/packages/views/settings/components/integrations-tab.test.tsx
index 908af71833..e72fd0b2c8 100644
--- a/packages/views/settings/components/integrations-tab.test.tsx
+++ b/packages/views/settings/components/integrations-tab.test.tsx
@@ -1,6 +1,7 @@
// @vitest-environment jsdom
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import "@testing-library/jest-dom/vitest";
import { cleanup, render, screen } from "@testing-library/react";
import { ApiError } from "@multica/core/api";
import { configStore } from "@multica/core/config";
@@ -95,6 +96,21 @@ describe("Settings IntegrationsTab", () => {
expect(queryCallsRef.current[0]?.enabled).toBe(true);
});
+ it("shows each channel description below its icon and title", () => {
+ renderTab();
+
+ for (const channel of ["lark", "slack", "dingtalk", "wecom"]) {
+ const icon = screen.getByTestId(`integration-channel-icon-${channel}`);
+ const title = icon.closest("h3");
+ const description = title?.nextElementSibling;
+ expect(title).not.toBeNull();
+ expect(description?.tagName).toBe("P");
+ expect(description).toHaveClass("text-caption", "text-muted-foreground");
+ expect(icon).not.toHaveClass("border");
+ expect(icon).not.toHaveClass("bg-muted/40");
+ }
+ });
+
it("hides Composio when the feature flag is on but the server reports 503", () => {
composioErrorRef.current = new ApiError("unavailable", 503, "Service Unavailable");
diff --git a/packages/views/settings/components/integrations-tab.tsx b/packages/views/settings/components/integrations-tab.tsx
index 94cf1d0eff..809c7ac801 100644
--- a/packages/views/settings/components/integrations-tab.tsx
+++ b/packages/views/settings/components/integrations-tab.tsx
@@ -13,6 +13,7 @@ import { useConfigStore, useFeatureEnabled } from "@multica/core/config";
import { COMPOSIO_MCP_APPS_FLAG } from "@multica/core/feature-flags";
import { useT } from "../../i18n";
import { SettingsSection, SettingsTab } from "./settings-layout";
+import { IntegrationChannelIcon } from "./integration-channel-icon";
// Integrations is the umbrella tab for third-party platform connections.
// GitHub has its own top-level tab (see github-tab.tsx); everything else
@@ -39,7 +40,15 @@ export function IntegrationsTab() {
return (
<SettingsTab title={t(($) => $.page.tabs.integrations)}>
- <SettingsSection title={t(($) => $.lark.section_title)}>
+ <SettingsSection
+ title={
+ <span className="flex items-center gap-2">
+ <IntegrationChannelIcon channel="lark" />
+ {t(($) => $.lark.section_title)}
+ </span>
+ }
+ description={t(($) => $.lark.page_description)}
+ >
<LarkTab />
</SettingsSection>
{composioEnabled && !composioUnconfigured && (
@@ -47,10 +56,26 @@ export function IntegrationsTab() {
<ComposioTab />
</SettingsSection>
)}
- <SettingsSection title={t(($) => $.slack.section_title)}>
+ <SettingsSection
+ title={
+ <span className="flex items-center gap-2">
+ <IntegrationChannelIcon channel="slack" />
+ {t(($) => $.slack.section_title)}
+ </span>
+ }
+ description={t(($) => $.slack.page_description)}
+ >
<SlackTab />
</SettingsSection>
- <SettingsSection title={t(($) => $.dingtalk.section_title)}>
+ <SettingsSection
+ title={
+ <span className="flex items-center gap-2">
+ <IntegrationChannelIcon channel="dingtalk" />
+ {t(($) => $.dingtalk.section_title)}
+ </span>
+ }
+ description={t(($) => $.dingtalk.page_description)}
+ >
<DingTalkTab />
</SettingsSection>
{vcsAvailable && (
@@ -58,7 +83,15 @@ export function IntegrationsTab() {
<VCSTab />
</SettingsSection>
)}
- <SettingsSection title={t(($) => $.wecom.section_title)}>
+ <SettingsSection
+ title={
+ <span className="flex items-center gap-2">
+ <IntegrationChannelIcon channel="wecom" />
+ {t(($) => $.wecom.section_title)}
+ </span>
+ }
+ description={t(($) => $.wecom.page_description)}
+ >
<WecomTab />
</SettingsSection>
</SettingsTab>
diff --git a/packages/views/settings/components/lark-tab.tsx b/packages/views/settings/components/lark-tab.tsx
index 5cebed5921..41a04d6439 100644
--- a/packages/views/settings/components/lark-tab.tsx
+++ b/packages/views/settings/components/lark-tab.tsx
@@ -107,12 +107,6 @@ export function LarkTab() {
return (
<div className="space-y-8">
- <section className="space-y-1">
- <p className="text-body text-muted-foreground">
- {t(($) => $.lark.page_description)}
- </p>
- </section>
-
{!configured ? (
<Card>
<CardContent className="space-y-2">
diff --git a/packages/views/settings/components/slack-tab.tsx b/packages/views/settings/components/slack-tab.tsx
index 9e1585c169..8f959c7588 100644
--- a/packages/views/settings/components/slack-tab.tsx
+++ b/packages/views/settings/components/slack-tab.tsx
@@ -90,12 +90,6 @@ export function SlackTab() {
return (
<div className="space-y-8">
- <section className="space-y-1">
- <p className="text-body text-muted-foreground">
- {t(($) => $.slack.page_description)}
- </p>
- </section>
-
{!configured ? (
<Card>
<CardContent className="space-y-2">
diff --git a/packages/views/settings/components/wecom-tab.tsx b/packages/views/settings/components/wecom-tab.tsx
index 78059c5d42..abe3ff6434 100644
--- a/packages/views/settings/components/wecom-tab.tsx
+++ b/packages/views/settings/components/wecom-tab.tsx
@@ -88,12 +88,6 @@ export function WecomTab() {
return (
<div className="space-y-8">
- <section className="space-y-1">
- <p className="text-body text-muted-foreground">
- {t(($) => $.wecom.page_description)}
- </p>
- </section>
-
{!configured ? (
<Card>
<CardContent className="space-y-2">