From 0d7b6ae64c0e890dbd3d0f436f4f89c571f7415c Mon Sep 17 00:00:00 2001 From: pcmid Date: Tue, 11 Aug 2026 11:27:49 +0800 Subject: [PATCH] fix(frontend): show security audit menu in simple mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The security audit group (Risk Control + Prompt Audit) was hidden from the sidebar via `hideInSimpleMode`, but nothing else in the stack restricts it in simple mode: - `router/index.ts` simple-mode `restrictedPaths` does not cover `/admin/risk-control` or `/admin/prompt-audit` - the `/risk-control` and `/prompt-audit` admin route groups have no `RunMode` gate, and neither does `internal/securityaudit/` nor `service/content_moderation.go` - `SettingsView.vue` renders the risk control toggle together with a `` shortcut, and the settings page stays visible in simple mode The feature is therefore fully usable in simple mode and already reachable through the settings page — only the sidebar entry was missing. Drop the flag so the menu matches actual behaviour. The group remains gated by `risk_control_enabled` (opt-in, default false) through `featureFlag: flagRiskControl`. --- frontend/src/components/layout/AppSidebar.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/components/layout/AppSidebar.vue b/frontend/src/components/layout/AppSidebar.vue index 2b519e37c9..d3644638b9 100644 --- a/frontend/src/components/layout/AppSidebar.vue +++ b/frontend/src/components/layout/AppSidebar.vue @@ -775,7 +775,6 @@ const adminNavItems = computed((): NavItem[] => { path: '/admin/security-audit', label: t('nav.securityAudit'), icon: ShieldIcon, - hideInSimpleMode: true, expandOnly: true, featureFlag: flagRiskControl, children: [