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 }) { function OriginalSituation({ scenario, centralStatement }) {
if (!scenario) return null; if (!scenario) return null;
return ( return (
<details className="rounded-lg border border-gray-200 bg-gray-50"> <div className="rounded-lg border border-gray-200 bg-gray-50/70 px-5 py-4">
<summary className="cursor-pointer px-5 py-3 text-sm font-medium text-gray-600 hover:text-gray-800"> <h2 className="mb-2 text-xs font-bold uppercase tracking-widest text-gray-400">
Original situation Original situation
</summary> </h2>
<div className="border-t border-gray-200 px-5 pb-4 pt-3 space-y-3"> {centralStatement && (
{centralStatement && ( <p className="mb-1 text-xs text-gray-400">{centralStatement}</p>
<p className="text-sm text-gray-600 italic">{centralStatement}</p> )}
)} <p className="whitespace-pre-wrap text-sm leading-relaxed text-gray-700">{scenario}</p>
<p className="whitespace-pre-wrap text-sm text-gray-800">{scenario}</p> </div>
</div>
</details>
); );
} }
@@ -514,12 +512,12 @@ export default function ReasoningWorkspace({
{/* ── 4. Current understanding ───────────────────── */} {/* ── 4. Current understanding ───────────────────── */}
{canAnswer && graph && <CurrentUnderstandingCard currentSummary={graph.currentSummary} />} {canAnswer && graph && <CurrentUnderstandingCard currentSummary={graph.currentSummary} />}
{/* ── 5. Investigation history ───────────────────── */} {/* ── 5. Original situation (always-visible reference) ─ */}
<InvestigationHistory turns={investigationHistory} />
{/* ── 6. Original situation (collapsed by default) ─ */}
<OriginalSituation scenario={scenario} centralStatement={graph?.centralStatement} /> <OriginalSituation scenario={scenario} centralStatement={graph?.centralStatement} />
{/* ── 6. Investigation history ───────────────────── */}
<InvestigationHistory turns={investigationHistory} />
{/* ── 7. Developer details (collapsed by default) ── */} {/* ── 7. Developer details (collapsed by default) ── */}
{(status === "success" || status === "error") && graph && ( {(status === "success" || status === "error") && graph && (
<DeveloperDetails <DeveloperDetails