fix(ui): preserve investigation workspace across no-question states
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
import getInvestigationMapTopics from "@/lib/map/investigation-map-adapter";
|
||||
import React from "react";
|
||||
|
||||
/* ── Status icons (unicode — no icon library dependency) ─── */
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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">
|
||||
{/* Active question — only when there is one */}
|
||||
{hasSelectedQuestion && (
|
||||
<>
|
||||
<CurrentInvestigationCard selectedQuestion={selectedQ} graph={graph} />
|
||||
|
||||
{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>
|
||||
|
||||
Reference in New Issue
Block a user