import type { Metadata } from "next"; import Link from "next/link"; import { EventRow } from "@/components/event-row"; import { Chip, Empty, PageHeader, Panel, Score, StateLabelText } from "@/components/ui"; import { api } from "@/lib/api"; import { relTime, typeLabel } from "@/lib/format"; export const dynamic = "force-dynamic"; export const metadata: Metadata = { title: "Radar", description: "Weak signals that are not yet breaking: unusual source activity, clusters of silent changes, documentation and repository bursts, fresh status changes." }; /** Radar (spec §101): indicators, not facts. */ export default async function RadarPage() { const r = await api.radar(); if (!r) return Radar is warming up.; return ( <> Indicators, not facts} title="Radar" description="What might become important next. Each item is a pattern in raw observations — a source far above its baseline, several silent changes around one entity, a burst of documentation or repository edits, a fresh status change — that has not (yet) produced a high-importance event." />
{r.unusual_source_activity.length ? (
    {r.unusual_source_activity.map((s) => (
  • {s.name} ×{s.ratio}
    {s.changes_3h} raw changes in 3 h · baseline {s.baseline_per_day}/day · no high-importance event yet
    {(s.categories ?? []).slice(0, 3).map((c) => {c})}
  • ))}
) : ( No source is quietly bursting above its baseline. )}
{r.silent_clusters.length ? (
    {r.silent_clusters.map((e) => (
  • {e.name} {e.silent_24h} silent
    {e.types.slice(0, 4).map((t) => {typeLabel(t)})}{relTime(e.last_at)}
  • ))}
) : ( No entity accumulated several silent changes. )}
{r.developing.length ? (
    {r.developing.map((c) => (
  • {c.title}
    {c.event_count} signals · {c.source_count} sources · velocity {Math.round(c.velocity ?? 0)}{relTime(c.last_at)}
  • ))}
) : ( No developing cluster. )}
{r.documentation_bursts.length ? (
    {r.documentation_bursts.map((s) => (
  • {s.name} {s.doc_changes_6h} edits
    {s.types.map((t) => {typeLabel(t)})}{relTime(s.last_at)}
  • ))}
) : ( No documentation burst. A launch often starts with several doc/API edits in a short window. )}
{r.repository_bursts.length ? (
    {r.repository_bursts.map((s) => (
  • {s.name} {s.repo_events_6h} releases/commits {relTime(s.last_at)}
  • ))}
) : ( No repository burst. )}
{r.new_coverage.length ? (
    {r.new_coverage.map((s) => (
  • {s.name}
    {s.source_name} · first event {relTime(s.first_event_at)}
    {s.events}
  • ))}
) : ( No sensor produced its first event today. )}
{r.status_changes.length ? r.status_changes.map((e) => ) : No fresh status-page change.}

{r.disclaimer} Generated {relTime(r.generated_at)}.

); }