import React, { useRef, useEffect, useState } from 'react'; import { gsap, ScrollTrigger } from '../lib/gsap.ts'; import { useReducedMotion } from '../hooks/useReducedMotion.ts'; import { DiagnosticCard } from '../components/diagnostics/DiagnosticCard.tsx'; import { StatePanel } from '../components/diagnostics/StatePanel.tsx'; import { healthChecks } from '../data/incidents.ts'; const DiagnosticsPage: React.FC = () => { const reduced = useReducedMotion(); const pinnedRef = useRef(null); const [checks, setChecks] = useState(healthChecks.map(c => ({ ...c, status: 'pending' as const }))); useEffect(() => { if (reduced) { setChecks(healthChecks.map(c => ({ ...c, status: 'pass' as const }))); return; } const ctx = gsap.context(() => { if (pinnedRef.current) { const phases = pinnedRef.current.querySelectorAll('.phase'); gsap.fromTo(phases, { opacity: 0, y: 30 }, { opacity: 1, y: 0, stagger: 0.3, scrollTrigger: { trigger: pinnedRef.current, start: 'top center', end: 'bottom center', scrub: true, onUpdate: (self) => { const index = Math.min(Math.floor(self.progress * healthChecks.length), healthChecks.length - 1); setChecks(prev => prev.map((c, i) => ({ ...c, status: i <= index ? 'pass' as const : 'pending' as const, }))); }, }, }); } }); return () => ctx.revert(); }, [reduced]); return (

Load Failure Diagnostics

All known failure modes are checked and resolved.

{checks.map((check) => (
))}

State Panel Examples

alert('Retrying...')} />
); }; export default DiagnosticsPage;