'use client'; import React from 'react'; import { Box } from '@/ui/Box'; import { Surface } from '@/ui/Surface'; import { Glow } from '@/ui/Glow'; import { Text } from '@/ui/Text'; import { Stack } from '@/ui/Stack'; import { Heading } from '@/ui/Heading'; import { Icon } from '@/ui/Icon'; import { AlertTriangle, RefreshCw, Home, Terminal } from 'lucide-react'; import { Button } from '@/ui/Button'; interface GlobalErrorScreenProps { error: Error & { digest?: string }; reset: () => void; onHome: () => void; } /** * GlobalErrorScreen * * A strong, minimal "system fault" view for the root global error boundary. * Instrument-grade UI following the "Precision Racing Minimal" theme. */ export function GlobalErrorScreen({ error, reset, onHome }: GlobalErrorScreenProps) { return ( {/* Background Accents - Subtle telemetry vibe */} {/* System Status Header */} System Fault Detected Status: Critical {/* Fault Description */} The application kernel encountered an unrecoverable execution error. Telemetry has been captured for diagnostic review. {/* Recovery Actions */} {/* Footer / Metadata */} GP-CORE-ERR-{error.digest?.substring(0, 8).toUpperCase() || 'UNKNOWN'} ); } /** * SystemStatusPanel * * Displays technical fault details in an instrument-grade panel. */ function SystemStatusPanel({ error }: { error: Error & { digest?: string } }) { return ( Fault Log {error.message || 'Unknown execution fault'} {error.digest && ( Digest: {error.digest} )} ); } /** * RecoveryActions * * Clear, instrument-grade recovery options. */ function RecoveryActions({ onRetry, onHome }: { onRetry: () => void; onHome: () => void }) { return ( ); }