From 96943ca528118b2a26f80cc61ffbb0af5120e2bb Mon Sep 17 00:00:00 2001 From: Carlos Valente Date: Sun, 28 Jun 2026 08:45:39 +0200 Subject: [PATCH] refactor: add to correct section --- .../app-settings/panel/feature-panel/FeaturePanel.tsx | 5 ----- .../panel/{feature-panel => settings-panel}/McpSection.tsx | 1 - .../app-settings/panel/settings-panel/SettingsPanel.tsx | 5 +++++ apps/client/src/features/app-settings/useAppSettingsMenu.tsx | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) rename apps/client/src/features/app-settings/panel/{feature-panel => settings-panel}/McpSection.tsx (94%) diff --git a/apps/client/src/features/app-settings/panel/feature-panel/FeaturePanel.tsx b/apps/client/src/features/app-settings/panel/feature-panel/FeaturePanel.tsx index 101b0c2a7..f88024a3e 100644 --- a/apps/client/src/features/app-settings/panel/feature-panel/FeaturePanel.tsx +++ b/apps/client/src/features/app-settings/panel/feature-panel/FeaturePanel.tsx @@ -4,7 +4,6 @@ import GenerateLinkFormExport from '../../../sharing/GenerateLinkFormExport'; import type { PanelBaseProps } from '../../panel-list/PanelList'; import * as Panel from '../../panel-utils/PanelUtils'; import InfoNif from '../network-panel/NetworkInterfaces'; -import McpSection from './McpSection'; import ReportSettings from './ReportSettings'; import URLPresets from './URLPresets'; @@ -12,7 +11,6 @@ export default function FeaturePanel({ location }: PanelBaseProps) { const presetsRef = useScrollIntoView('presets', location); const linkRef = useScrollIntoView('link', location); const reportRef = useScrollIntoView('report', location); - const mcpRef = useScrollIntoView('mcp', location); return ( <> @@ -35,9 +33,6 @@ export default function FeaturePanel({ location }: PanelBaseProps) { -
- -
diff --git a/apps/client/src/features/app-settings/panel/feature-panel/McpSection.tsx b/apps/client/src/features/app-settings/panel/settings-panel/McpSection.tsx similarity index 94% rename from apps/client/src/features/app-settings/panel/feature-panel/McpSection.tsx rename to apps/client/src/features/app-settings/panel/settings-panel/McpSection.tsx index 37addf1d1..013e7de3c 100644 --- a/apps/client/src/features/app-settings/panel/feature-panel/McpSection.tsx +++ b/apps/client/src/features/app-settings/panel/settings-panel/McpSection.tsx @@ -6,7 +6,6 @@ import useInfo from '../../../../common/hooks-query/useInfo'; import { isOntimeCloud, serverURL } from '../../../../externals'; import * as Panel from '../../panel-utils/PanelUtils'; -/** MCP endpoint card — isolated so that URL state changes don't re-render the rest of FeaturePanel */ export default function McpSection() { const { data: infoData } = useInfo(); const [mcpEndpointUrl, setMcpEndpointUrl] = useState(''); diff --git a/apps/client/src/features/app-settings/panel/settings-panel/SettingsPanel.tsx b/apps/client/src/features/app-settings/panel/settings-panel/SettingsPanel.tsx index ccbf86ffa..2e6d4473b 100644 --- a/apps/client/src/features/app-settings/panel/settings-panel/SettingsPanel.tsx +++ b/apps/client/src/features/app-settings/panel/settings-panel/SettingsPanel.tsx @@ -4,6 +4,7 @@ import type { PanelBaseProps } from '../../panel-list/PanelList'; import * as Panel from '../../panel-utils/PanelUtils'; import CustomViews from '../manage-panel/CustomViews'; import GeneralSettings from './GeneralSettings'; +import McpSection from './McpSection'; import ProjectData from './ProjectData'; import ServerPortSettings from './ServerPortSettings'; import ViewSettings from './ViewSettings'; @@ -13,6 +14,7 @@ export default function SettingsPanel({ location }: PanelBaseProps) { const generalRef = useScrollIntoView('general', location); const viewRef = useScrollIntoView('view', location); const customViewsRef = useScrollIntoView('custom-views', location); + const mcpRef = useScrollIntoView('mcp', location); const portRef = useScrollIntoView('port', location); return ( @@ -30,6 +32,9 @@ export default function SettingsPanel({ location }: PanelBaseProps) {
+
+ +
{!isDocker && (
diff --git a/apps/client/src/features/app-settings/useAppSettingsMenu.tsx b/apps/client/src/features/app-settings/useAppSettingsMenu.tsx index 3b34468cd..e1acbaa6d 100644 --- a/apps/client/src/features/app-settings/useAppSettingsMenu.tsx +++ b/apps/client/src/features/app-settings/useAppSettingsMenu.tsx @@ -20,6 +20,7 @@ const staticOptions = [ { id: 'settings__view', label: 'View settings' }, { id: 'settings__custom-views', label: 'Custom views' }, { id: 'settings__port', label: 'Server port' }, + { id: 'sharing__mcp', label: 'MCP Server' }, ], }, {