From 498e3c6a84b5bfbd696e491e6f9f6b140a1e6ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=87=AF?= Date: Tue, 23 Jun 2026 19:46:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B7=B1=E9=93=BE):=20=E3=80=8C=E4=B8=8A?= =?UTF-8?q?=E4=B8=80=E6=AD=A5=E3=80=8D=E8=BF=9B=E5=A4=A7=E5=B1=8F=E7=BB=98?= =?UTF-8?q?=E5=88=B6=E9=A1=B5=E5=BC=BA=E5=88=B6=E6=98=BE=E7=A4=BA=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=AF=BC=E8=88=AA=E6=A0=8F+=E4=BE=A7=E8=BE=B9?= =?UTF-8?q?=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PageLayout 对 /strategy/dashboard-agent 路由强制 pageSidebarAllowed(不受界面模式/ 会话级 sidebar 标志影响;仍尊重 embed=1 嵌入态隐藏),避免从去 chrome 的深链工作区进来后整页无顶栏/侧栏 - 「上一步」按钮 openMode 改回 self(同窗导航;forceChrome 后同窗/新窗都能带回 chrome) Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend-web/src/core/auth/task-buttons.ts | 4 +++- frontend-web/src/pages/PageRoutes.tsx | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend-web/src/core/auth/task-buttons.ts b/frontend-web/src/core/auth/task-buttons.ts index 7f95b577..84be6bfe 100644 --- a/frontend-web/src/core/auth/task-buttons.ts +++ b/frontend-web/src/core/auth/task-buttons.ts @@ -155,7 +155,9 @@ export function defaultTaskButtons(cfg: TaskDeeplinkConfig): TaskButton[] { { // 上一步:放在「下一步」左边(底部快捷跳转栏,prev 组渲染在 next 组之前)。 // 默认指向**应用内**「大屏绘制」页 /page/strategy/dashboard-agent(内部路由,以 / 开头), - // 携带 ?taskId=任务id(大屏页按 taskId 取数);openMode=self → 同窗 react-router 导航。 + // 携带 ?taskId=任务id(大屏页按 taskId 取数)。openMode=self → 同窗 react-router 导航; + // 大屏页路由在 PageLayout 里被**强制显示全局 chrome**(见 PageRoutes 的 forceChromeForDashboardAgent), + // 故即便从去 chrome 的工作区进来也带回顶部导航栏 + 侧边栏(embed=1 外部嵌入态仍隐藏)。 id: "rwfx-prev", business: "rwfx", label: "上一步", diff --git a/frontend-web/src/pages/PageRoutes.tsx b/frontend-web/src/pages/PageRoutes.tsx index aceffd87..a49f984c 100644 --- a/frontend-web/src/pages/PageRoutes.tsx +++ b/frontend-web/src/pages/PageRoutes.tsx @@ -44,8 +44,15 @@ function PageLayout() { () => isEmbedActive() || readEmbedParam(location.search) === "on", [location.pathname, location.search], ); + // 「大屏绘制」独立页(/page/strategy/dashboard-agent)本就是「带导航栏 + 侧边栏」的独立页, + // 但它常被深链「上一步」从去 chrome 的工作区/新标签打开——那里 chromeByPreference 可能为 false + // (界面模式非全量、或会话级 sidebar 未置位),导致整页没有顶栏/侧栏。故对该路由**强制全局 chrome** + // (仍尊重 embed=1 嵌入态:外部 iframe 套用时仍隐藏)。 + const forceChromeForDashboardAgent = location.pathname.includes("/strategy/dashboard-agent"); const pageSidebarAllowed = - chromeByPreference && !isChatsIframeWorkspacePath(location.pathname) && !embedActive; + (forceChromeForDashboardAgent || chromeByPreference) && + !isChatsIframeWorkspacePath(location.pathname) && + !embedActive; // h-full(100%)而非 h-screen(100vh):配合 globals.css 的 html/body/#root height:100% // 高度链,根布局跟随容器高度。全屏下 100% 解析到视口,与 h-screen 等价;无界等嵌套