fix(F2,F3): onboarding chip in Header, auth catch-all redirects to dashboard
Some checks failed
app-ci-deploy / test-build-deploy (push) Has been cancelled

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 <noreply@anthropic.com>
This commit is contained in:
kcar 2026-05-31 11:00:55 +00:00
parent fedbd903ff
commit bf592886c6
2 changed files with 12 additions and 2 deletions

View File

@ -169,8 +169,8 @@ const AppRoutes: React.FC = () => {
</Route>
)}
{/* Fallback route - use different NotFound pages based on auth state */}
<Route path="*" element={user ? <NotFound /> : <NotFoundPublic />} />
{/* Fallback route - authenticated users go to dashboard, unauthenticated see public 404 */}
<Route path="*" element={user ? <Navigate to="/dashboard" replace /> : <NotFoundPublic />} />
</Routes>
</Layout>
);

View File

@ -7,6 +7,7 @@ import {
Typography,
IconButton,
Box,
Chip,
useTheme,
Menu,
MenuItem,
@ -126,6 +127,15 @@ const Header: React.FC = () => {
</Typography>
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
{isAuthenticated && bootstrapData?.onboarding?.next_step && bootstrapData.onboarding.next_step !== 'ready' && (
<Chip
label={bootstrapData.onboarding.next_step.replace(/_/g, ' ')}
color="warning"
size="small"
onClick={() => navigate('/dashboard')}
sx={{ cursor: 'pointer', display: { xs: 'none', sm: 'flex' } }}
/>
)}
{isAuthenticated && (
<Typography
variant="body2"