From 153865c7345d87fc97037f4277758eaa8cde3d11 Mon Sep 17 00:00:00 2001 From: wren <“porlong@qq.com”> Date: Wed, 6 May 2026 18:02:05 +0800 Subject: [PATCH] fix: force full reload when leaving review detail --- app/components/layout/Sidebar.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/components/layout/Sidebar.tsx b/app/components/layout/Sidebar.tsx index b76db1d..8576c87 100644 --- a/app/components/layout/Sidebar.tsx +++ b/app/components/layout/Sidebar.tsx @@ -110,6 +110,15 @@ export function Sidebar({ onToggle, collapsed, userRole, frontendJWT = '' }: Sid const isCrossCheckingPath = isPathInSection('/cross-checking'); const isChatPath = isPathInSection('/chat-with-llm'); const isContractTemplatePath = isPathInSection('/contract-template') || isPathInSection('/contract-draft'); + const shouldForceDocumentNavigation = isPathInSection('/reviewsTest'); + + const navigateWithFallback = (path: string) => { + if (shouldForceDocumentNavigation && typeof window !== 'undefined') { + window.location.assign(path); + return; + } + navigate(path); + }; useEffect(() => { if (typeof window !== 'undefined') { @@ -509,14 +518,14 @@ export function Sidebar({ onToggle, collapsed, userRole, frontendJWT = '' }: Sid