diff --git a/src/frontend/client/src/layouts/MainLayout.tsx b/src/frontend/client/src/layouts/MainLayout.tsx index 586e4bdc0..93bf68183 100644 --- a/src/frontend/client/src/layouts/MainLayout.tsx +++ b/src/frontend/client/src/layouts/MainLayout.tsx @@ -320,10 +320,15 @@ export default function MainLayout() { ); const isAppChatRoute = /^\/app(\/|$)/.test(pathname); const isChannelRoute = /^\/channel(\/|$)/.test(pathname); - /** 订阅 / 应用中心 / 应用对话:白卡片不滚动,把高度交给页面内层(含移动端 ≤767 与桌面窄窗) */ + const isKnowledgeSettingsRoute = Boolean( + matchPath({ path: '/knowledge/create', end: true }, pathForMatch) || + matchPath({ path: '/knowledge/space/:spaceId/settings', end: true }, pathForMatch), + ); + /** These full-height surfaces keep the white shell fixed and delegate scrolling to their page content. */ const innerScrollShell = /^\/(c|linsight)(\/|$)/.test(pathname) || isChannelRoute || + isKnowledgeSettingsRoute || isAppChatRoute || (isAppsArea && !isAppsExploreRoute); const isKnowledgeRoute = /^\/knowledge(\/|$)/.test(pathname); diff --git a/src/frontend/client/src/pages/unifiedPermissionEntryRoutes.test.tsx b/src/frontend/client/src/pages/unifiedPermissionEntryRoutes.test.tsx index 7c2214c55..803e4aae7 100644 --- a/src/frontend/client/src/pages/unifiedPermissionEntryRoutes.test.tsx +++ b/src/frontend/client/src/pages/unifiedPermissionEntryRoutes.test.tsx @@ -21,6 +21,14 @@ describe("F044 unified permission entry structure", () => { expect(routes).toContain("default: module.ChannelSettingsPage"); }); + it("gives knowledge create and settings pages an inner scrolling shell", () => { + const layout = source("layouts/MainLayout.tsx"); + + expect(layout).toContain("path: '/knowledge/create'"); + expect(layout).toContain("path: '/knowledge/space/:spaceId/settings'"); + expect(layout).toContain("isKnowledgeSettingsRoute ||"); + }); + it("uses one settings callback and retains unrelated channel actions", () => { const articleMenu = source("pages/Subscription/ArticleList/ChannelActionsMenu.tsx"); const sidebarItem = source("pages/Subscription/Sidebar/ChannelItem.tsx");