Frontend redesign chunk 4: navigation and routing
Rewrite Nav.tsx to the five-destination IA from UI_REDESIGN.md §3 (Live,
Incidents, Archive, Watch, Network) on tokens/sans type, with Settings,
Admin, Trips and Profile moved into the avatar dropdown instead of sitting
as nav peers. Network stays gated to admin/operator, matching the write
boundary its constituent pages (nodes/systems/tokens) already had.
Delete app/dashboard/page.tsx — its incident cards become the Live rail,
its node cards become Network, its call table becomes Archive; nothing on
it is unique. Add app/map/page.tsx -> redirect('/') and rewrite
app/calls/page.tsx -> redirect('/incidents') (Archive/search is blocked on
backend work, chunk 12).
ChromeSwitcher now gives a signed-in user at "/" the app shell instead of
marketing chrome; app/page.tsx branches the same way, sending a signed-in
provisioned user to /incidents as an honest interim until the Live screen
itself lands (chunk 6) — marketing content and behavior for signed-out
visitors is unchanged.
Left the light-mode !important overrides in globals.css in place past this
chunk (deviating from the chunk 4 acceptance criteria) — they still back
every page outside this redesign's 11-chunk scope (settings, admin,
profile, marketing). Deleting them now would break light mode on all of
those. Logged in DEFERRED.md.
Per UI_REDESIGN.md chunk 4.
This commit is contained in:
@@ -45,7 +45,13 @@ export function ChromeSwitcher({ children }: { children: React.ReactNode }) {
|
||||
router.replace("/onboarding");
|
||||
}, [loading, user, orgId, pathname, router]);
|
||||
|
||||
if (MARKETING_PATHS.has(pathname)) {
|
||||
// "/" is marketing for a signed-out visitor, but the moment someone is
|
||||
// signed in it's Live — the map is the home screen (UI_REDESIGN.md §3),
|
||||
// not a marketing page. Every other marketing path stays marketing
|
||||
// regardless of auth state.
|
||||
const showMarketingChrome = MARKETING_PATHS.has(pathname) && !(pathname === "/" && user);
|
||||
|
||||
if (showMarketingChrome) {
|
||||
return (
|
||||
<>
|
||||
<MarketingHeader />
|
||||
@@ -55,6 +61,17 @@ export function ChromeSwitcher({ children }: { children: React.ReactNode }) {
|
||||
);
|
||||
}
|
||||
|
||||
// Live ("/") is full-bleed under its own top bar, not the padded
|
||||
// max-width container the rest of the app uses.
|
||||
if (pathname === "/" && user) {
|
||||
return (
|
||||
<>
|
||||
<Nav />
|
||||
<main className="h-[calc(100vh-3.75rem)]">{children}</main>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Nav />
|
||||
|
||||
Reference in New Issue
Block a user