From dc4508d5ea6dfb6ba1528bf09c42a8e7a7716c49 Mon Sep 17 00:00:00 2001 From: johngreen Date: Wed, 29 Apr 2026 21:04:31 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20AI=20=EC=96=B4=EC=8B=9C=EC=8A=A4?= =?UTF-8?q?=ED=84=B4=ED=8A=B8=20entry=20=E2=80=94=20WorkspacePage=20?= =?UTF-8?q?=EC=A7=81=EC=A0=91=20=EB=A0=8C=EB=8D=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit invyone SPA 탭 시스템은 AdminPageRenderer 가 cleanUrl 로 컴포넌트를 매칭하는 구조라, redirect/router.replace 로는 _URL 만 바뀌고 본문은 빈 컴포넌트를 그대로_ 렌더하는 문제가 있었다. WorkspacePage 를 직접 import 해서 첫 자식 메뉴 클릭 시에도 워크스페이스 화면이 즉시 표시되도록 변경. Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/app/(main)/admin/aiAssistant/page.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/frontend/app/(main)/admin/aiAssistant/page.tsx b/frontend/app/(main)/admin/aiAssistant/page.tsx index ec5f6c5e..8b6ca2aa 100644 --- a/frontend/app/(main)/admin/aiAssistant/page.tsx +++ b/frontend/app/(main)/admin/aiAssistant/page.tsx @@ -1,17 +1,15 @@ "use client"; -import { useEffect } from "react"; -import { useRouter } from "next/navigation"; +import WorkspacePage from "./workspace/page"; /** - * AI 어시스턴트 진입 시 워크스페이스로 이동. - * server-side redirect() 는 invyone SPA 탭 시스템과 충돌해 빈 화면이 발생하므로 - * client-side router.replace 로 처리한다. + * AI 어시스턴트 진입점. + * invyone 의 SPA 탭 시스템은 _AdminPageRenderer가 cleanUrl 매칭으로 컴포넌트를 + * import_ 하는 구조라, redirect / router.replace 로는 화면 전환이 안 된다. + * (URL 만 바뀌고 탭 컨테이너는 빈 컴포넌트를 그대로 렌더) + * + * 따라서 워크스페이스 컴포넌트를 직접 import 해서 렌더링한다. */ export default function AIAssistantPage() { - const router = useRouter(); - useEffect(() => { - router.replace("/admin/aiAssistant/workspace"); - }, [router]); - return null; + return ; }