import { AlertTriangle, RefreshCw } from "lucide-react"; import "./DbCorruptionBanner.css"; interface DbCorruptionBannerProps { errors: string[]; lastCheckedAt: string | null; onRefresh: () => void | Promise; refreshing: boolean; refreshError: string | null; } export function DbCorruptionBanner({ errors, lastCheckedAt, onRefresh, refreshing, refreshError, }: DbCorruptionBannerProps) { if (errors.length === 0) { return null; } const visibleErrors = errors.slice(0, 5); const checkedAtLabel = lastCheckedAt ? new Date(lastCheckedAt).toLocaleString() : null; return (

Fusion's background SQLite integrity check reported corruption. Review the failing objects below before continuing critical operations.

What to do:{" "} Back up the project, try fn db --vacuum if the database still opens cleanly, and restore from a known-good backup if corruption persists. See{" "} docs/storage.md {" "}for the storage layout and recovery guidance.

{refreshError ?

{refreshError}

: null}
); }