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 getInvestigationMapTopics from "@/lib/map/investigation-map-adapter";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
/* ── Status icons (unicode — no icon library dependency) ─── */
|
/* ── Status icons (unicode — no icon library dependency) ─── */
|
||||||
|
|
||||||
@@ -97,4 +98,4 @@ export default function InvestigationMap({ turnCount = 0 }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
* (Version A). No new backend fields or API contracts are required.
|
* (Version A). No new backend fields or API contracts are required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
/* ── Helpers ──────────────────────────────────────────────── */
|
/* ── Helpers ──────────────────────────────────────────────── */
|
||||||
|
|
||||||
function formatTimestamp(iso) {
|
function formatTimestamp(iso) {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { buildFacilitatorViewModel } from "@/lib/presentation/facilitator-view-adapter";
|
import { buildFacilitatorViewModel } from "@/lib/presentation/facilitator-view-adapter";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
/* ── Item rendering ─────────────────────────────────────────────── */
|
/* ── Item rendering ─────────────────────────────────────────────── */
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
/* ── Helpers ──────────────────────────────────────────────── */
|
/* ── Helpers ──────────────────────────────────────────────── */
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
function formatTimestamp(iso) {
|
function formatTimestamp(iso) {
|
||||||
if (!iso) return "—";
|
if (!iso) return "—";
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -658,16 +658,23 @@ export default function ReasoningWorkspace({
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
{hasSelectedQuestion && (
|
{/* ── Workspace grid: persistent whenever a graph exists ─── */}
|
||||||
|
{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 lg:col-span-2">
|
<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 && (
|
{updateStatus === "success" && !isUpdating && (
|
||||||
<UpdateAcknowledgement updateResult={result} />
|
<UpdateAcknowledgement updateResult={result} />
|
||||||
|
)}
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Answer form — only when a question is active and not loading */}
|
||||||
{!isUpdating && canAnswer && (
|
{!isUpdating && canAnswer && (
|
||||||
<form onSubmit={handleUpdateCaptureAndSubmit} className="space-y-4 rounded-lg border border-gray-200 bg-white p-5">
|
<form onSubmit={handleUpdateCaptureAndSubmit} className="space-y-4 rounded-lg border border-gray-200 bg-white p-5">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user