'use client'; import { Button } from '@/ui/Button'; import { Card } from '@/ui/Card'; import { Glow } from '@/ui/Glow'; import { Heading } from '@/ui/Heading'; import { Icon } from '@/ui/Icon'; import { Text } from '@/ui/Text'; import { ErrorPageContainer } from '@/ui/ErrorPageContainer'; import { AlertTriangle, Home, RefreshCw, Terminal } from 'lucide-react'; import React from 'react'; 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 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 (
); }