"use client"; import React from "react"; import { listInvestigations, restartInvestigation } from "@/lib/storage/investigation-storage"; import Link from "next/link"; import { useRouter } from "next/navigation"; function Portfolio() { const router = useRouter(); const [summaries, setSummaries] = React.useState([]); const [showRestartConfirm, setShowRestartConfirm] = React.useState(false); React.useEffect(() => { setSummaries(listInvestigations()); }, []); return (

Confidence Engine

Investigator's notebook — index of persisted investigations.

{/* Investigation collection */} {summaries.length > 0 && (

Investigations

{summaries.map((summary) => (

{summary.scenario || "Untitled investigation"}

{summary.reportExists ? (
View report {summary.reportGeneratedFromRevision === summary.investigationRevision ? ( Current ) : ( Update available )}
) : null} Continue investigation {showRestartConfirm === summary.id && (
setShowRestartConfirm(null)} >
e.stopPropagation()} >

Restart this investigation?

Your current investigation, findings, clarified questions, and report will be lost. Are you sure you want to continue?

)}
))}
)} {/* No investigations */} {summaries.length === 0 && (

Investigations

No investigations yet.

)}
); } export default Portfolio;