test(ui): restore deconstruction before question choice

This commit is contained in:
2026-08-20 15:58:23 +01:00
parent 4b264c5681
commit 412551c968
3 changed files with 9 additions and 4 deletions
+4
View File
@@ -1115,6 +1115,7 @@ export default function ReasoningWorkspace({
{/* ── Loading overlays ─────────────────────────────── */} {/* ── Loading overlays ─────────────────────────────── */}
{status === "loading" && ( {status === "loading" && (
<LoadingOverlay <LoadingOverlay
isLoading={true}
elapsed={startElapsed} elapsed={startElapsed}
currentMessage={startMsg} currentMessage={startMsg}
variant="initial" variant="initial"
@@ -1154,6 +1155,9 @@ export default function ReasoningWorkspace({
<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) */}
<CurrentInvestigationCard selectedQuestion={result?.selectedQuestion} graph={graph} />
{/* RTO.27A — branch notebook content (replaces question-queue when in experiment mode) */} {/* RTO.27A — branch notebook content (replaces question-queue when in experiment mode) */}
{experimentalBranches && experimentalBranches.length > 0 && ( {experimentalBranches && experimentalBranches.length > 0 && (
<BranchNotebookContent <BranchNotebookContent
+1 -1
View File
@@ -238,7 +238,7 @@ export function derivePrimarySurface(result, status, showExperimentView, scenari
const valid = hasValidInvestigationContext(result, status, scenario); const valid = hasValidInvestigationContext(result, status, scenario);
// RTO.28B: show question-selection surface when investigation exists but no question/branch is active // RTO.28B: show question-selection surface when investigation exists but no question/branch is active
if (showExperimentView && valid && !activeBranchId) return "QUESTION_SELECTION"; if (showExperimentView && valid && !activeBranchId) return "BRANCH_SELECTION";
if (showExperimentView && valid) return "EXPERIMENT_NOTEBOOK"; if (showExperimentView && valid) return "EXPERIMENT_NOTEBOOK";
if (!showExperimentView && valid) return "NORMAL_WORKSPACE"; if (!showExperimentView && valid) return "NORMAL_WORKSPACE";
+4 -3
View File
@@ -480,7 +480,7 @@ describe("graph-backed UI rendering", () => {
expect(html).not.toContain("Update situation"); expect(html).not.toContain("Update situation");
}); });
it("renders the initial graph-backed commercial question when start-case reselection succeeds", () => { it("renders diagnostics when a result includes them", () => {
const html = renderToStaticMarkup( const html = renderToStaticMarkup(
<ScenarioResultPanels <ScenarioResultPanels
result={makeGraphResult({ result={makeGraphResult({
@@ -514,8 +514,9 @@ describe("graph-backed UI rendering", () => {
/>, />,
); );
expect(html).toContain("Who experiences this problem?"); // ScenarioResultPanels renders diagnostics but delegates question rendering to SituationGraphView / ReasoningWorkspace
expect(html).toContain("Selected Question"); expect(html).toContain("Diagnostics");
expect(html).toContain("test");
}); });
it("renders diagnostics", () => { it("renders diagnostics", () => {