/** * DebugView -- displays raw lore data for debugging. * * Shows the raw JSON response from get_lore_status for visual * verification that the data pipeline is working end-to-end. * Access via the debug view in the navigation. */ import { useLoreData } from "@/hooks/useLoreData"; export function DebugView(): React.ReactElement { const { data, isLoading, error, refetch } = useLoreData(); if (isLoading) { return (
Loading lore data...
); } if (error) { return (
Error: {error.message}
); } return (

Lore Debug

{/* Status overview */}

Status

Health:
{data?.is_healthy ? "Healthy" : "Unhealthy"}
Last Sync: {data?.last_sync ?? "never"}
Message: {data?.message}
{/* Summary counts */} {data?.summary && (

Summary

{data.summary.open_issues}
Open Issues
{data.summary.authored_mrs}
Authored MRs
{data.summary.reviewing_mrs}
Reviewing MRs
)} {/* Raw JSON output */}

Raw Response

          {JSON.stringify(data, null, 2)}
        
); }