experiment: facilitator view from reasoning graph
This commit is contained in:
@@ -6,6 +6,7 @@ import GraphUpdateView from "@/components/graph-update-view";
|
||||
import SituationGraphView from "@/components/situation-graph-view";
|
||||
import InvestigationSummaryPanel from "@/components/investigation-summary-panel";
|
||||
import InvestigationSummaryPanelV2 from "@/components/investigation-summary-panel-v2";
|
||||
import InvestigationSummaryPanelV3 from "@/components/investigation-summary-panel-v3";
|
||||
import InvestigationMap from "@/components/investigation-map";
|
||||
|
||||
// ── Technical summary detector (main view filters these) ───
|
||||
@@ -524,8 +525,8 @@ export default function ReasoningWorkspace({
|
||||
const [investigationHistory, setInvestigationHistory] = useState([]);
|
||||
const turnCounter = useRef(0);
|
||||
const pendingTurnRef = useRef(null);
|
||||
// ── Experiment 11: toggle between progress panel versions ──
|
||||
const [showVersionB, setShowVersionB] = useState(false);
|
||||
// ── Experiment 12: toggle between progress panel versions (temporary experimental UI) ──
|
||||
const [panelVariant, setPanelVariant] = useState("c");
|
||||
const { saveSession, loadSession } = useSessionPersistence();
|
||||
|
||||
// Persist workspace state on every successful update (Phase 3)
|
||||
@@ -718,28 +719,55 @@ export default function ReasoningWorkspace({
|
||||
{hasCurrentSummaryCondition && (
|
||||
<>
|
||||
<CurrentUnderstandingCard currentSummary={graph?.currentSummary || result?.updatedSituationGraph?.currentSummary} plainLanguage={propUnderstanding || null} />
|
||||
{/* ── Experiment 11: progress panel A / B toggle ── */}
|
||||
{/* ── Experiment 12: progress panel A / B / C toggle (temporary experimental UI) ── */}
|
||||
{hasGraph && (
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex items-center gap-2" role="radiogroup" aria-label="Progress panel variant">
|
||||
<button
|
||||
onClick={() => setShowVersionB(false)}
|
||||
className={`text-xs transition ${!showVersionB ? "font-medium text-gray-700 underline" : "text-gray-400 hover:text-gray-500"}`}
|
||||
role="radio"
|
||||
aria-checked={panelVariant === "a"}
|
||||
onClick={() => setPanelVariant("a")}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "ArrowRight") setPanelVariant("b");
|
||||
if (e.key === "ArrowLeft") setPanelVariant("c");
|
||||
}}
|
||||
className={`text-xs transition ${panelVariant === "a" ? "font-medium text-gray-700 underline" : "text-gray-400 hover:text-gray-500"}`}
|
||||
>
|
||||
Panel A
|
||||
</button>
|
||||
<span className="text-gray-300">/</span>
|
||||
<button
|
||||
onClick={() => setShowVersionB(true)}
|
||||
className={`text-xs transition ${showVersionB ? "font-medium text-gray-700 underline" : "text-gray-400 hover:text-gray-500"}`}
|
||||
role="radio"
|
||||
aria-checked={panelVariant === "b"}
|
||||
onClick={() => setPanelVariant("b")}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "ArrowRight") setPanelVariant("c");
|
||||
if (e.key === "ArrowLeft") setPanelVariant("a");
|
||||
}}
|
||||
className={`text-xs transition ${panelVariant === "b" ? "font-medium text-gray-700 underline" : "text-gray-400 hover:text-gray-500"}`}
|
||||
>
|
||||
Panel B
|
||||
</button>
|
||||
<span className="text-gray-300">/</span>
|
||||
<button
|
||||
role="radio"
|
||||
aria-checked={panelVariant === "c"}
|
||||
onClick={() => setPanelVariant("c")}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "ArrowRight") setPanelVariant("a");
|
||||
if (e.key === "ArrowLeft") setPanelVariant("b");
|
||||
}}
|
||||
className={`text-xs transition ${panelVariant === "c" ? "font-medium text-gray-700 underline" : "text-gray-400 hover:text-gray-500"}`}
|
||||
>
|
||||
Panel C
|
||||
</button>
|
||||
</div>
|
||||
<div className="opacity-75">
|
||||
{showVersionB
|
||||
? <InvestigationSummaryPanelV2 graph={graph} selectedQuestion={selectedQ} result={result} updateStatus={updateStatus} />
|
||||
: <InvestigationSummaryPanel graph={graph} selectedQuestion={selectedQ} result={result} updateStatus={updateStatus} />
|
||||
{panelVariant === "a"
|
||||
? <InvestigationSummaryPanel graph={graph} selectedQuestion={selectedQ} result={result} updateStatus={updateStatus} />
|
||||
: panelVariant === "b"
|
||||
? <InvestigationSummaryPanelV2 graph={graph} selectedQuestion={selectedQ} result={result} updateStatus={updateStatus} />
|
||||
: <InvestigationSummaryPanelV3 graph={graph} selectedQuestion={selectedQ} result={result} />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user