feat(confidence-engine): show investigation learning in report
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { loadInvestigation, saveInvestigation } from "@/lib/storage/investigation-storage";
|
||||
import { deriveInvestigationLearning } from "@/lib/graph/episode-preparation";
|
||||
import Link from "next/link";
|
||||
|
||||
export default function ReportPage({ params }) {
|
||||
@@ -191,6 +192,32 @@ export default function ReportPage({ params }) {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* What the investigation surfaced — deterministic learning projection */}
|
||||
{(() => {
|
||||
const learning = deriveInvestigationLearning({
|
||||
situationGraph: existing?.situationGraph,
|
||||
contributions: existing?.focusedContributions ?? [],
|
||||
findings: existing?.findings ?? [],
|
||||
});
|
||||
return learning.length > 0 ? (
|
||||
<div className="mt-6 rounded-xl border-[2.5px] border-teal-300/70 bg-gradient-to-b from-teal-50/60 to-white px-8 pt-6 pb-7 shadow-sm">
|
||||
<h2 className="mb-3 text-[11px] font-bold tracking-[.18em] uppercase text-teal-700/70">
|
||||
What the investigation surfaced
|
||||
</h2>
|
||||
{learning.map((group, gi) => (
|
||||
<div key={gi} className="mt-4 space-y-2">
|
||||
<p className="text-base font-medium text-gray-800">{group.questionText}</p>
|
||||
{group.propositions.map((prop, pi) => (
|
||||
<p key={pi} className="text-base leading-relaxed text-gray-700 italic">
|
||||
{prop.proposition}
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : null;
|
||||
})()}
|
||||
|
||||
{/* What remains plausible — conditional */}
|
||||
{report.hasPlausibleInterpretations && report.plausibleInterpretations ? (
|
||||
<div className="mt-6 rounded-xl border-[2.5px] border-blue-300/70 bg-gradient-to-b from-blue-50/60 to-white px-8 pt-6 pb-7 shadow-sm">
|
||||
|
||||
Reference in New Issue
Block a user