refine(confidence-engine): clarify portfolio investigation actions

This commit is contained in:
2026-09-03 07:01:18 +01:00
parent 32e1b01767
commit 0da7b63e30
3 changed files with 94 additions and 12 deletions
+9 -7
View File
@@ -1,7 +1,7 @@
"use client";
import React from "react";
import { loadInvestigation } from "@/lib/storage/investigation-storage";
import { loadInvestigation, clearInvestigation } from "@/lib/storage/investigation-storage";
import Link from "next/link";
const INVESTIGATION_ID = "case-1";
@@ -50,15 +50,17 @@ function Portfolio() {
href={`/investigations/${INVESTIGATION_ID}`}
className="rounded-lg border border-teal-600 bg-white px-4 py-2 font-medium text-teal-700 hover:bg-teal-50 transition"
>
Open investigation
Continue investigation
</Link>
<Link
href={`/investigations/${INVESTIGATION_ID}`}
className="rounded-lg border border-teal-600 bg-white px-4 py-2 font-medium text-teal-700 hover:bg-teal-50 transition"
<button
onClick={() => {
try { clearInvestigation(); } catch (_) { /* storage must not crash caller */ }
}}
className="rounded-lg border border-red-400 bg-white px-4 py-2 font-medium text-red-700 hover:bg-red-50 transition"
>
Create new investigation
</Link>
Restart investigation
</button>
</div>
</div>
</section>