fix(ui): make initial reflection surface exclusive to post-Analyse state
Add three exclusivity guards that suppress legacy surfaces during the initial post-Analyse reflection state (postAnalyseStatus === 'success'): - CurrentInvestigationCard: suppressed because its selectedQuestion from startCase was leaking into the initial reflection view - OpenQuestionsPanel: suppressed because it rendered whenever hasGraph was true, regardless of initial reflection state - Terminal state cards (EvidenceLimitCard / CompletionCard): suppressed because they fired on status='success' && !hasSelectedQuestion Transition out of initial reflection happens when user clicks a proposed finding, which sets formulationStep='active' and triggers the existing deactivation useEffect. No reasoning changes. No startCase changes. No mock changes.
This commit is contained in:
@@ -840,18 +840,6 @@ export default function ReasoningWorkspace({
|
|||||||
onAnswerSubmit,
|
onAnswerSubmit,
|
||||||
lastSubmittedAnswer,
|
lastSubmittedAnswer,
|
||||||
onRestart,
|
onRestart,
|
||||||
branchContext,
|
|
||||||
// ── RTO.26B — branch-local reasoning (explicit provenance) ──
|
|
||||||
experimentalBranches,
|
|
||||||
branchLocalQuestions,
|
|
||||||
branchLocalContributions,
|
|
||||||
branchLocalLateResults,
|
|
||||||
inactiveBranchNewResults,
|
|
||||||
activeBranchIdForNotebook,
|
|
||||||
// ── RTO.27B — provisional pause state ──
|
|
||||||
doneForNowBranchIds,
|
|
||||||
onDoneForNow,
|
|
||||||
onReopenBranch,
|
|
||||||
}) {
|
}) {
|
||||||
const [investigationHistory, setInvestigationHistory] = useState([]);
|
const [investigationHistory, setInvestigationHistory] = useState([]);
|
||||||
const turnCounter = useRef(0);
|
const turnCounter = useRef(0);
|
||||||
@@ -1168,7 +1156,7 @@ export default function ReasoningWorkspace({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ── No graph produced after initial analysis ───────── */}
|
{/* ── No graph produced after initial analysis ───────── */}
|
||||||
{(status === "success" || status === "error") && !graph && !(experimentalBranches && experimentalBranches.length > 0) ? (
|
{(status === "success" || status === "error") && !graph ? (
|
||||||
<div className="rounded-lg border border-yellow-300 bg-yellow-50 px-4 py-3 text-sm text-yellow-800">
|
<div className="rounded-lg border border-yellow-300 bg-yellow-50 px-4 py-3 text-sm text-yellow-800">
|
||||||
{diagnostics?.noQuestionReason
|
{diagnostics?.noQuestionReason
|
||||||
? "Validation failed — no structured graph output was produced."
|
? "Validation failed — no structured graph output was produced."
|
||||||
@@ -1217,30 +1205,17 @@ export default function ReasoningWorkspace({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ── Workspace grid: persistent whenever a graph exists ─── */}
|
{/* ── Workspace grid: persistent whenever a graph exists ─── */}
|
||||||
{(hasGraph || experimentalBranches) && (
|
{hasGraph && (
|
||||||
<div className="grid grid-cols-1 gap-6 lg:grid-cols-3">
|
<div className="grid grid-cols-1 gap-6 lg:grid-cols-3">
|
||||||
{/* ── Left lane: active conversation & notebook ───────── */}
|
{/* ── Left lane: active conversation & notebook ───────── */}
|
||||||
<div className={`space-y-6 ${hasGraph ? 'lg:col-span-2' : 'lg:col-span-full'}`}>
|
<div className={`space-y-6 ${hasGraph ? 'lg:col-span-2' : 'lg:col-span-full'}`}>
|
||||||
{/* Current investigation (prominent hero section) */}
|
{/* Current investigation (prominent hero section) */}
|
||||||
<CurrentInvestigationCard selectedQuestion={result?.selectedQuestion} graph={graph} />
|
{postAnalyseStatus !== "success" && (
|
||||||
|
<CurrentInvestigationCard selectedQuestion={result?.selectedQuestion} graph={graph} />
|
||||||
{/* RTO.27A — branch notebook content (replaces question-queue when in experiment mode) */}
|
|
||||||
{experimentalBranches && experimentalBranches.length > 0 && (
|
|
||||||
<BranchNotebookContent
|
|
||||||
branchContext={branchContext}
|
|
||||||
contributions={branchLocalContributions || []}
|
|
||||||
openQuestions={branchLocalQuestions || []}
|
|
||||||
lateResults={branchLocalLateResults || []}
|
|
||||||
inactiveBranchNewResults={inactiveBranchNewResults || {}}
|
|
||||||
doneForNowBranchIds={doneForNowBranchIds || []}
|
|
||||||
onDoneForNow={onDoneForNow}
|
|
||||||
branchId={activeBranchIdForNotebook}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* ── Open questions (case workspace) — no ranking bias ── */}
|
{/* ── Open questions (case workspace) — no ranking bias ── */}
|
||||||
{/* Only shown when NOT in experiment mode (experiment uses BranchNotebookContent) */}
|
{postAnalyseStatus !== "success" && (
|
||||||
{!experimentalBranches || experimentalBranches.length === 0 ? (
|
|
||||||
<OpenQuestionsPanel
|
<OpenQuestionsPanel
|
||||||
graph={graph}
|
graph={graph}
|
||||||
selectedPresentationItemId={selectedPresentationItemId}
|
selectedPresentationItemId={selectedPresentationItemId}
|
||||||
@@ -1261,18 +1236,15 @@ export default function ReasoningWorkspace({
|
|||||||
focusedAnswer={focusedAnswer}
|
focusedAnswer={focusedAnswer}
|
||||||
setDoneForNowIds={setDoneForNowIds}
|
setDoneForNowIds={setDoneForNowIds}
|
||||||
/>
|
/>
|
||||||
) : null}
|
)}
|
||||||
|
|
||||||
{/* Terminal state */}
|
{/* Terminal state — suppressed during initial reflection */}
|
||||||
{status === "success" && !hasSelectedQuestion && (
|
{postAnalyseStatus !== "success" && status === "success" && !hasSelectedQuestion && (
|
||||||
<>
|
<>
|
||||||
{genuineCompletion && (
|
{genuineCompletion && (
|
||||||
<CompletionCard summary={resolveCurrentSummary(propUnderstanding || graph?.currentSummary || result?.updatedSituationGraph?.currentSummary)} />
|
<CompletionCard summary={resolveCurrentSummary(propUnderstanding || graph?.currentSummary || result?.updatedSituationGraph?.currentSummary)} />
|
||||||
)}
|
)}
|
||||||
{!genuineCompletion && experimentalBranches && experimentalBranches.length > 0 ? (
|
{!genuineCompletion ? (
|
||||||
// Quiet state is handled inside BranchNotebookContent for experiment mode
|
|
||||||
null
|
|
||||||
) : !genuineCompletion ? (
|
|
||||||
<EvidenceLimitCard summary={resolveCurrentSummary(propUnderstanding || graph?.currentSummary || result?.updatedSituationGraph?.currentSummary)} />
|
<EvidenceLimitCard summary={resolveCurrentSummary(propUnderstanding || graph?.currentSummary || result?.updatedSituationGraph?.currentSummary)} />
|
||||||
) : null}
|
) : null}
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user