fix: preserve tldr investigation hierarchy

This commit is contained in:
2026-08-04 18:19:07 +01:00
parent f703fdc842
commit 5de0c57cce
+13 -15
View File
@@ -478,20 +478,7 @@ export default function ReasoningWorkspace({
</div>
) : (
<>
{/* ── 1. Terminal state: outcome card (no active question) ─ */}
{status === "success" && !canAnswer && graph && !isUpdating && genuineCompletion && <CompletionCard />}
{status === "success" && !canAnswer && graph && !isUpdating && !genuineCompletion && <EvidenceLimitCard />}
{/* ── 2. Current understanding (when meaningful) ─ */}
{(graph?.currentSummary || (status === "success" && !canAnswer)) && <CurrentUnderstandingCard currentSummary={graph.currentSummary} />}
{/* ── 3. Original situation (always-visible reference) ─ */}
<OriginalSituation scenario={scenario} centralStatement={graph?.centralStatement} />
{/* ── 4. Investigation history ───────────────────── */}
{investigationHistory.length > 0 && <InvestigationHistory turns={investigationHistory} />}
{/* ── Active investigation: question + form + acknowledgement ─ */}
{/* ── Active investigation: question + form (top priority) ─ */}
{canAnswer && (
<>
<CurrentInvestigationCard selectedQuestion={selectedQ} graph={graph} />
@@ -531,7 +518,18 @@ export default function ReasoningWorkspace({
</>
)}
{/* ── 5. Developer details (collapsed by default) ─ */}
{/* ── Terminal state: outcome card (no active question) ─ */}
{status === "success" && !hasSelectedQuestion && graph && genuineCompletion && <CompletionCard />}
{status === "success" && !hasSelectedQuestion && graph && !genuineCompletion && <EvidenceLimitCard />}
{/* ── Supporting sections (same order for active and terminal) ─ */}
{(graph?.currentSummary || (status === "success" && !canAnswer)) && <CurrentUnderstandingCard currentSummary={graph.currentSummary} />}
<OriginalSituation scenario={scenario} centralStatement={graph?.centralStatement} />
{investigationHistory.length > 0 && <InvestigationHistory turns={investigationHistory} />}
{/* ── Developer details (collapsed by default) ── */}
{(status === "success" || status === "error") && graph && (
<DeveloperDetails
graph={graph}