Frontend redesign chunk 4: navigation and routing
Build & Deploy / Build & push images (push) Successful in 4m21s
Build & Deploy / Deploy to VM (push) Failing after 11m50s

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:
Logan Cusano
2026-08-19 23:01:13 -04:00
parent 8fdedee25b
commit eaae452d4e
6 changed files with 151 additions and 571 deletions
+27 -1
View File
@@ -1,8 +1,13 @@
"use client";
import { useEffect } from "react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { LinkButton } from "@/components/ui/Button";
import { Card } from "@/components/ui/Card";
import { Badge } from "@/components/ui/Badge";
import { PLANS } from "@/lib/billing";
import { useAuth } from "@/components/AuthProvider";
const CAPABILITIES = [
{
@@ -37,7 +42,7 @@ const STEPS = [
{ n: "03", title: "Your team watches", body: "Incidents show up on the live map and dashboard with an AI summary, units on scene, and every related recording." },
];
export default function MarketingHomePage() {
function MarketingHomePage() {
return (
<div>
{/* Hero */}
@@ -139,3 +144,24 @@ export default function MarketingHomePage() {
</div>
);
}
/**
* "/" is marketing for a signed-out visitor and Live (the map) for anyone
* signed in — see UI_REDESIGN.md §3, "the map is the home screen". The Live
* screen itself lands in chunk 6; until then a signed-in, provisioned user
* is sent to /incidents rather than shown stale marketing copy. A user with
* no org_id yet still sees marketing (unchanged — that's the pre-redesign
* behaviour for an unprovisioned account, out of scope here).
*/
export default function HomePage() {
const { user, loading, orgId } = useAuth();
const router = useRouter();
useEffect(() => {
if (loading || !user || !orgId) return;
router.replace("/incidents");
}, [loading, user, orgId, router]);
if (loading || (user && orgId)) return null;
return <MarketingHomePage />;
}