fix: unify reasoning mode across submissions

This commit is contained in:
2026-08-05 08:27:22 +01:00
parent c87fd65e13
commit 6d11c1d503
5 changed files with 132 additions and 4 deletions
+4 -2
View File
@@ -29,7 +29,7 @@ function humaniseDuration(seconds) {
/* ── Component ────────────────────────────────────────────── */
function InvestigationSummaryPanel({ graph, selectedQuestion, result }) {
function InvestigationSummaryPanel({ graph, selectedQuestion, result, updateStatus }) {
// ── Current status ────────────────────────────────────────────
// TODO: reasoning should emit an explicit status field such as
// "investigating", "evidence_limit_reached", "resolution_achieved".
@@ -38,7 +38,9 @@ function InvestigationSummaryPanel({ graph, selectedQuestion, result }) {
const hasGraph = Boolean(graph);
let currentStatus;
if (!hasGraph) {
if (updateStatus === "loading") {
currentStatus = { label: "Reasoning", level: "investigating" };
} else if (!hasGraph) {
currentStatus = { label: "Not started", level: "idle" };
} else if (isInvestigating) {
currentStatus = { label: "Investigation in progress", level: "investigating" };
+1 -1
View File
@@ -673,7 +673,7 @@ export default function ReasoningWorkspace({
) : (
<>
{/* ── Investigation summary card ─────────────── */}
<InvestigationSummaryPanel graph={graph} selectedQuestion={selectedQ} result={result} />
<InvestigationSummaryPanel graph={graph} selectedQuestion={selectedQ} result={result} updateStatus={updateStatus} />
{/* ── Active investigation: question + form (top priority) ─ */}
{canAnswer && (
+11 -1
View File
@@ -443,7 +443,7 @@ export default function ScenarioForm() {
)}
{/* ── Main result workspace ─────────────────────── */}
{(status === "success" || status === "error" || updateStatus === "success") && (
{(status === "success" || status === "error") && updateStatus !== "loading" && (
<ReasoningWorkspace
scenario={scenario}
status={status}
@@ -475,6 +475,16 @@ export default function ScenarioForm() {
/>
)}
{/* ── Update loading (reasoning mode) ─────────── */}
{updateStatus === "loading" && status === "success" && (
<LoadingOverlay
isLoading={true}
elapsed={updateElapsed}
currentMessage={updateMsg}
variant="update"
/>
)}
{/* ── Continue later banner when session was restored ── */}
{status === "success" && result?.updatedAt && (
<ContinueLaterBanner onRestart={() => { clearSession(); setStatus("idle"); setResult(null); setAnswer(""); setUpdateStatus("idle"); setCurrentUnderstanding(null); }} />