From 63ef4851471e18033e29fd62ed5e60075d7a3e86 Mon Sep 17 00:00:00 2001 From: Y1fe1Zh0u Date: Tue, 28 Jul 2026 17:33:33 +0800 Subject: [PATCH] Hide internal system tools from company settings System-category tools are Runtime protocol details rather than tenant-configurable capabilities. Skip rendering the generated system group while leaving the underlying collection, counts, search, and backend records unchanged.\n\nConstraint: Preserve legacy database rows, Runtime behavior, and existing collection logic.\nConfidence: high\nScope-risk: narrow\nDirective: Keep system-category tools out of user-facing tool management surfaces.\nTested: npm test (86 passed); npm run build\nNot-tested: Browser E2E against a deployed tenant --- frontend/src/pages/EnterpriseSettings.tsx | 2 ++ frontend/tests/enterpriseToolVisibility.test.mjs | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 frontend/tests/enterpriseToolVisibility.test.mjs diff --git a/frontend/src/pages/EnterpriseSettings.tsx b/frontend/src/pages/EnterpriseSettings.tsx index 17aa8953f..25a12aa49 100644 --- a/frontend/src/pages/EnterpriseSettings.tsx +++ b/frontend/src/pages/EnterpriseSettings.tsx @@ -1257,6 +1257,8 @@ export default function EnterpriseSettings() { return aMeta.label.localeCompare(bMeta.label); }) .map(([category, catTools]) => { + // System tools are Runtime protocol details, not company-managed capabilities. + if (category === 'system') return null; const allCatTools = allGrouped[category] || catTools; const meta = getToolGroupMeta(category, allCatTools); const hasCategoryConfig = !!GLOBAL_CATEGORY_CONFIG_SCHEMAS[meta.configCategory]; diff --git a/frontend/tests/enterpriseToolVisibility.test.mjs b/frontend/tests/enterpriseToolVisibility.test.mjs new file mode 100644 index 000000000..92328c364 --- /dev/null +++ b/frontend/tests/enterpriseToolVisibility.test.mjs @@ -0,0 +1,13 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import test from 'node:test'; + +const source = readFileSync( + new URL('../src/pages/EnterpriseSettings.tsx', import.meta.url), + 'utf8', +); + +test('company settings do not render the protocol-level system tools group', () => { + assert.match(source, /if \(category === 'system'\) return null/); + assert.doesNotMatch(source, /visibleGlobalTools/); +});