Adds dashboard controls for managing MCP server configuration across global and project scopes. - Add global and project MCP settings sections with server cards, validation, inheritance status, and import/export controls. - Wire MCP settings into split-save behavior, browser-safe core exports, localization, and dashboard documentation. - Cover MCP settings interactions and save routing with dashboard tests. Files changed: .changeset/fn-7025-mcp-dashboard-ui.md | 7 + docs/dashboard-guide.md | 14 + packages/core/src/types.ts | 4 + .../app/__tests__/settings-save-split.test.ts | 25 + .../dashboard/app/components/SettingsModal.tsx | 25 + .../__tests__/SettingsModal.mcp.test.tsx | 228 +++++++++ .../app/components/settings/save-split.ts | 5 + .../settings/sections/GlobalMcpSection.tsx | 26 ++ .../settings/sections/McpServersCard.css | 177 +++++++ .../settings/sections/McpServersCard.tsx | 515 +++++++++++++++++++++ .../settings/sections/ProjectMcpSection.tsx | 27 ++ packages/i18n/locales/en/app.json | 10 +- packages/i18n/locales/es/app.json | 10 +- packages/i18n/locales/fr/app.json | 10 +- packages/i18n/locales/ko/app.json | 10 +- packages/i18n/locales/zh-CN/app.json | 10 +- packages/i18n/locales/zh-TW/app.json | 10 +- 17 files changed, 1107 insertions(+), 6 deletions(-) Fusion-Task-Id: FN-7025 Fusion-Task-Lineage: e4e59431-c819-464b-a04b-e470ac51c460
28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import type { Dispatch, ReactNode, SetStateAction } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import type { GlobalSettings, Settings } from "@fusion/core";
|
|
import type { ToastType } from "../../../hooks/useToast";
|
|
import { McpServersCard } from "./McpServersCard";
|
|
|
|
export interface ProjectMcpSectionProps {
|
|
scopeBanner: ReactNode;
|
|
form: Settings;
|
|
setForm: Dispatch<SetStateAction<Settings>>;
|
|
globalSettings?: Pick<GlobalSettings, "mcpServers"> | null;
|
|
projectId?: string;
|
|
addToast: (message: string, type?: ToastType) => void;
|
|
}
|
|
|
|
export function ProjectMcpSection({ scopeBanner, form, setForm, globalSettings, projectId, addToast }: ProjectMcpSectionProps) {
|
|
const { t } = useTranslation("app");
|
|
return (
|
|
<>
|
|
{scopeBanner}
|
|
<h4 className="settings-section-heading">{t("settings.nav.mcp", "MCP Servers")}</h4>
|
|
<McpServersCard scope="project" form={form} setForm={setForm} globalSettings={globalSettings} projectId={projectId} addToast={addToast} />
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default ProjectMcpSection;
|