diff --git a/src/App.tsx b/src/App.tsx index 95b933f..7e0b2ff 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -544,8 +544,18 @@ function Shortcut({ keyName, label }: { keyName: string; label: string }) { function DiagnosticsPage({ onNavigate, showNotice, facade }: { onNavigate: (page: Page) => void; showNotice: (message: string) => void; facade: BitBybitWebCadFacade }) { const [recovery, setRecovery] = useState<{ integrity: string; lastSavedVersion: number | null; warnings: string[] } | null>(null) + const [geometry, setGeometry] = useState(() => facade.geometry.capabilities()) + const document = facade.getState().document + const persistence = facade.project.capabilities() + const geometryTone = geometry.status === 'ready' ? 'green' : geometry.status === 'failed' || geometry.status === 'unavailable' ? 'amber' : 'cyan' + const geometryValue = geometry.status === 'ready' ? 'Ready' : geometry.status === 'initializing' ? 'Loading' : geometry.status useEffect(() => { void facade.project.recovery(facade.getState().document.id).then(setRecovery).catch((error: unknown) => showNotice(`Recovery report unavailable: ${error instanceof Error ? error.message : String(error)}`)) }, [facade, showNotice]) - return
onNavigate('start')} actions={} />
Runtime

Capability checks

Last checked just now
showNotice('Document diagnostics opened')} />
+ useEffect(() => { + let disposed = false + void facade.geometry.initialize().then((capabilities) => { if (!disposed) setGeometry(capabilities) }).catch((error: unknown) => { if (!disposed) showNotice(`Geometry capability probe failed: ${error instanceof Error ? error.message : String(error)}`) }) + return () => { disposed = true } + }, [facade, showNotice]) + return
onNavigate('start')} actions={} />
Runtime

Capability checks

Last checked just now
showNotice('Document diagnostics opened')} />
} function HealthCard({ label, value, detail, tone, icon: HealthIcon }: { label: string; value: string; detail: string; tone: 'green' | 'cyan' | 'amber'; icon: Icon }) {