import { useState, useEffect, useRef } from "react"; import { AlertCircle, CloudCog, Lock } from "lucide-react"; import { useObservabilityData } from "./hooks/useObservabilityData"; import { IconRail } from "./components/layout/IconRail"; import { AnomalyRadarBar } from "./components/AnomalyRadarBar"; import { TopBar } from "./components/layout/TopBar"; import { CommandAndQueryBar } from "./components/CommandAndQueryBar"; import { WaveformHistogram } from "./components/WaveformHistogram"; import { EntryVisualization } from "./components/EntryVisualization"; import { handleCallback, login } from "./lib/auth"; function AuthCallbackView() { const [error, setError] = useState(null); const handledRef = useRef(false); useEffect(() => { if (handledRef.current) return; handledRef.current = true; handleCallback() .then(() => { window.location.href = "/"; }) .catch((err) => { console.error("Authentication callback error:", err); setError(err instanceof Error ? err.message : String(err)); }); }, []); return (
{error ? (

Authentication failed

{error}

) : (

Completing sign in

Exchanging authorization code with OIDC provider…

)}
); } function App() { const { isConnected, traces, logs, metrics, activeTab } = useObservabilityData(); const hasLoadedAnyData = traces.length > 0 || logs.length > 0 || metrics.length > 0; const isCallback = typeof window !== "undefined" && (window.location.pathname === "/auth_callback" || window.location.search.includes("code=")); // The redesigned screens (issues, logs, RUM sessions, rollouts, metrics) own // their own filter bar and cards, so the legacy anomaly banner and volume // waveform above them would just duplicate that UI in a different visual language. const isTriageOverview = activeTab === "tab0" || activeTab === "tab3" || activeTab === "tab7" || activeTab === "tab9" || activeTab === "tab10" || activeTab === "tab2"; if (isCallback) { return ; } return (
{/* Fixed 72px icon rail */} {/* Main Content Area offset by the rail width */}
{/* Fixed top bar */} {/* Main Telemetry Console View */}
{!isTriageOverview && }
{!isTriageOverview && ( <> {/* Filter Bar */} {/* Ingest & Incident Waveform Histogram */} )} {/* Telemetry Visualizations & Views */}
{isConnected || hasLoadedAnyData ? ( ) : (

Establishing telemetry pipeline

Connecting to OTLP collector. Listening for incoming traces, logs, and metrics.

)}
); } export default App;