fix: keep original situation visible in workspace

This commit is contained in:
2026-08-04 17:57:51 +01:00
parent 91bc3f1445
commit 55ed4da69a
+13 -15
View File
@@ -233,22 +233,20 @@ function InvestigationHistory({ turns }) {
);
}
// ── Original situation (collapsed by default) ─────────────────
// ── Original situation (always-visible reference card) ────────
function OriginalSituation({ scenario, centralStatement }) {
if (!scenario) return null;
return (
<details className="rounded-lg border border-gray-200 bg-gray-50">
<summary className="cursor-pointer px-5 py-3 text-sm font-medium text-gray-600 hover:text-gray-800">
<div className="rounded-lg border border-gray-200 bg-gray-50/70 px-5 py-4">
<h2 className="mb-2 text-xs font-bold uppercase tracking-widest text-gray-400">
Original situation
</summary>
<div className="border-t border-gray-200 px-5 pb-4 pt-3 space-y-3">
{centralStatement && (
<p className="text-sm text-gray-600 italic">{centralStatement}</p>
)}
<p className="whitespace-pre-wrap text-sm text-gray-800">{scenario}</p>
</div>
</details>
</h2>
{centralStatement && (
<p className="mb-1 text-xs text-gray-400">{centralStatement}</p>
)}
<p className="whitespace-pre-wrap text-sm leading-relaxed text-gray-700">{scenario}</p>
</div>
);
}
@@ -514,12 +512,12 @@ export default function ReasoningWorkspace({
{/* ── 4. Current understanding ───────────────────── */}
{canAnswer && graph && <CurrentUnderstandingCard currentSummary={graph.currentSummary} />}
{/* ── 5. Investigation history ───────────────────── */}
<InvestigationHistory turns={investigationHistory} />
{/* ── 6. Original situation (collapsed by default) ─ */}
{/* ── 5. Original situation (always-visible reference) ─ */}
<OriginalSituation scenario={scenario} centralStatement={graph?.centralStatement} />
{/* ── 6. Investigation history ───────────────────── */}
<InvestigationHistory turns={investigationHistory} />
{/* ── 7. Developer details (collapsed by default) ── */}
{(status === "success" || status === "error") && graph && (
<DeveloperDetails