fix: unify reasoning mode across submissions
This commit is contained in:
@@ -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" };
|
||||
|
||||
@@ -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 && (
|
||||
|
||||
@@ -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); }} />
|
||||
|
||||
Reference in New Issue
Block a user