From 9264f1af82da6561ea4d4a1f59c8796c979642ba Mon Sep 17 00:00:00 2001 From: shinchan-zhai Date: Mon, 23 Mar 2026 09:14:34 +0800 Subject: [PATCH] fix: root route shows Agent page instead of LandingPage - / now defaults to AgentChatPage (NOFXi's main interface) - Agent page accessible without login - LandingPage only shown at /landing or for non-agent pages when not logged in --- web/src/App.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index 3b2033b1..5da6516b 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -445,13 +445,15 @@ function App() { ) } - // Show landing page for root route - if (route === '/' || route === '') { + // Root route → go to Agent (NOFXi 的主界面就是 Agent) + // Landing page only for explicit /landing + if (route === '/landing') { return } - // Redirect unauthenticated users to landing page - if (!user || !token) { + // Agent page is accessible without login + // Other pages redirect to landing if not authenticated + if ((!user || !token) && currentPage !== 'agent') { return }