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,
|
||||
lastSubmittedAnswer,
|
||||
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 turnCounter = useRef(0);
|
||||
@@ -1168,7 +1156,7 @@ export default function ReasoningWorkspace({
|
||||
)}
|
||||
|
||||
{/* ── 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">
|
||||
{diagnostics?.noQuestionReason
|
||||
? "Validation failed — no structured graph output was produced."
|
||||
@@ -1217,30 +1205,17 @@ export default function ReasoningWorkspace({
|
||||
)}
|
||||
|
||||
{/* ── Workspace grid: persistent whenever a graph exists ─── */}
|
||||
{(hasGraph || experimentalBranches) && (
|
||||
{hasGraph && (
|
||||
<div className="grid grid-cols-1 gap-6 lg:grid-cols-3">
|
||||
{/* ── Left lane: active conversation & notebook ───────── */}
|
||||
<div className={`space-y-6 ${hasGraph ? 'lg:col-span-2' : 'lg:col-span-full'}`}>
|
||||
{/* Current investigation (prominent hero section) */}
|
||||
<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}
|
||||
/>
|
||||
{postAnalyseStatus !== "success" && (
|
||||
<CurrentInvestigationCard selectedQuestion={result?.selectedQuestion} graph={graph} />
|
||||
)}
|
||||
|
||||
{/* ── Open questions (case workspace) — no ranking bias ── */}
|
||||
{/* Only shown when NOT in experiment mode (experiment uses BranchNotebookContent) */}
|
||||
{!experimentalBranches || experimentalBranches.length === 0 ? (
|
||||
{postAnalyseStatus !== "success" && (
|
||||
<OpenQuestionsPanel
|
||||
graph={graph}
|
||||
selectedPresentationItemId={selectedPresentationItemId}
|
||||
@@ -1261,18 +1236,15 @@ export default function ReasoningWorkspace({
|
||||
focusedAnswer={focusedAnswer}
|
||||
setDoneForNowIds={setDoneForNowIds}
|
||||
/>
|
||||
) : null}
|
||||
)}
|
||||
|
||||
{/* Terminal state */}
|
||||
{status === "success" && !hasSelectedQuestion && (
|
||||
{/* Terminal state — suppressed during initial reflection */}
|
||||
{postAnalyseStatus !== "success" && status === "success" && !hasSelectedQuestion && (
|
||||
<>
|
||||
{genuineCompletion && (
|
||||
<CompletionCard summary={resolveCurrentSummary(propUnderstanding || graph?.currentSummary || result?.updatedSituationGraph?.currentSummary)} />
|
||||
)}
|
||||
{!genuineCompletion && experimentalBranches && experimentalBranches.length > 0 ? (
|
||||
// Quiet state is handled inside BranchNotebookContent for experiment mode
|
||||
null
|
||||
) : !genuineCompletion ? (
|
||||
{!genuineCompletion ? (
|
||||
<EvidenceLimitCard summary={resolveCurrentSummary(propUnderstanding || graph?.currentSummary || result?.updatedSituationGraph?.currentSummary)} />
|
||||
) : null}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user