fix(ui): preserve investigation workspace across no-question states

This commit is contained in:
2026-08-17 08:06:01 +01:00
parent 0cd68f40a5
commit f2f495d5c7
5 changed files with 18 additions and 5 deletions
+2 -1
View File
@@ -11,6 +11,7 @@
*/
import getInvestigationMapTopics from "@/lib/map/investigation-map-adapter";
import React from "react";
/* ── Status icons (unicode — no icon library dependency) ─── */
@@ -97,4 +98,4 @@ export default function InvestigationMap({ turnCount = 0 }) {
</div>
</div>
);
}
}
@@ -14,6 +14,8 @@
* (Version A). No new backend fields or API contracts are required.
*/
import React from "react";
/* ── Helpers ──────────────────────────────────────────────── */
function formatTimestamp(iso) {
@@ -12,6 +12,7 @@
*/
import { buildFacilitatorViewModel } from "@/lib/presentation/facilitator-view-adapter";
import React from "react";
/* ── Item rendering ─────────────────────────────────────────────── */
@@ -7,6 +7,8 @@
/* ── Helpers ──────────────────────────────────────────────── */
import React from "react";
function formatTimestamp(iso) {
if (!iso) return "—";
try {
+11 -4
View File
@@ -658,16 +658,23 @@ export default function ReasoningWorkspace({
</div>
) : (
<>
{hasSelectedQuestion && (
{/* ── Workspace grid: persistent whenever a graph exists ─── */}
{hasGraph && (
<div className="grid grid-cols-1 gap-6 lg:grid-cols-3">
{/* ── Left lane: active conversation & notebook ───────── */}
<div className="space-y-6 lg:col-span-2">
<CurrentInvestigationCard selectedQuestion={selectedQ} graph={graph} />
{/* Active question — only when there is one */}
{hasSelectedQuestion && (
<>
<CurrentInvestigationCard selectedQuestion={selectedQ} graph={graph} />
{updateStatus === "success" && !isUpdating && (
<UpdateAcknowledgement updateResult={result} />
{updateStatus === "success" && !isUpdating && (
<UpdateAcknowledgement updateResult={result} />
)}
</>
)}
{/* Answer form — only when a question is active and not loading */}
{!isUpdating && canAnswer && (
<form onSubmit={handleUpdateCaptureAndSubmit} className="space-y-4 rounded-lg border border-gray-200 bg-white p-5">
<div>