Frontend redesign chunk 6: Live view
Build & Deploy / Build & push images (push) Successful in 4m39s
Build & Deploy / Deploy to VM (push) Failing after 6m9s

New components/LiveView.tsx renders the default landing at "/": full-bleed
MapView (rail + legend from chunk 5) plus a new TimeScrubber strip below
it — real call-density bars over the selected 1h/6h/24h/7d window, tinted
by the worst severity in each bucket, playhead pinned to NOW. The playhead
doesn't scrub yet; that needs `resolved_at` on incidents, which doesn't
exist server-side (blocked chunk 13, in DEFERRED.md) — the density data
itself is live, not a fixture.

Distinguishes the two empty states UI_REDESIGN.md §4 calls out: a
configured-but-quiet org (nodes online, zero active incidents) now shows
"Listening — last check-in Xm ago" instead of rendering nothing, separate
from the zero-node case (chunk 10's Activation screen).

app/page.tsx's HomePage now renders LiveView directly for a signed-in,
provisioned user instead of the chunk-4 interim redirect to /incidents.

Per UI_REDESIGN.md chunk 6.
This commit is contained in:
Logan Cusano
2026-08-19 23:05:49 -04:00
parent 31c0b3addf
commit bc636c00ce
3 changed files with 177 additions and 14 deletions
+7 -14
View File
@@ -1,13 +1,12 @@
"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";
import { LiveView } from "@/components/LiveView";
const CAPABILITIES = [
{
@@ -147,21 +146,15 @@ function MarketingHomePage() {
/**
* "/" 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).
* signed in — see UI_REDESIGN.md §3, "the map is the home screen". 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;
* ChromeSwitcher's own no-claim guard only fires off marketing paths).
*/
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;
if (loading) return null;
if (user && orgId) return <LiveView />;
return <MarketingHomePage />;
}