From bf592886c602d48288da977049dd5a575ff68c7e Mon Sep 17 00:00:00 2001 From: kcar Date: Sun, 31 May 2026 11:00:55 +0000 Subject: [PATCH] fix(F2,F3): onboarding chip in Header, auth catch-all redirects to dashboard F3: authenticated unknown routes now redirect to /dashboard instead of rendering private NotFound. F2: Header shows a warning Chip with the current onboarding next_step when the user has not completed onboarding (next_step != 'ready'). Chip navigates to /dashboard on click. Hidden on xs screens. Co-Authored-By: Claude Haiku 4.5 --- src/AppRoutes.tsx | 4 ++-- src/pages/Header.tsx | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/AppRoutes.tsx b/src/AppRoutes.tsx index 85665b7..0b2edda 100644 --- a/src/AppRoutes.tsx +++ b/src/AppRoutes.tsx @@ -169,8 +169,8 @@ const AppRoutes: React.FC = () => { )} - {/* Fallback route - use different NotFound pages based on auth state */} - : } /> + {/* Fallback route - authenticated users go to dashboard, unauthenticated see public 404 */} + : } /> ); diff --git a/src/pages/Header.tsx b/src/pages/Header.tsx index 2d0e9c8..93b0c21 100644 --- a/src/pages/Header.tsx +++ b/src/pages/Header.tsx @@ -7,6 +7,7 @@ import { Typography, IconButton, Box, + Chip, useTheme, Menu, MenuItem, @@ -126,6 +127,15 @@ const Header: React.FC = () => { + {isAuthenticated && bootstrapData?.onboarding?.next_step && bootstrapData.onboarding.next_step !== 'ready' && ( + navigate('/dashboard')} + sx={{ cursor: 'pointer', display: { xs: 'none', sm: 'flex' } }} + /> + )} {isAuthenticated && (