test(ui): explore branch as workspace context
This commit is contained in:
@@ -521,6 +521,7 @@ export default function ReasoningWorkspace({
|
||||
onAnswerSubmit,
|
||||
lastSubmittedAnswer,
|
||||
onRestart,
|
||||
branchContext,
|
||||
}) {
|
||||
const [investigationHistory, setInvestigationHistory] = useState([]);
|
||||
const turnCounter = useRef(0);
|
||||
@@ -823,6 +824,21 @@ export default function ReasoningWorkspace({
|
||||
<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 branch context (experiment RTO.25D) */}
|
||||
{branchContext && hasGraph && (
|
||||
<div className="rounded-lg border border-blue-200/60 bg-blue-50/40 px-5 py-4">
|
||||
<h2 className="mb-1 text-[11px] font-semibold tracking-widest uppercase text-gray-500">
|
||||
Current branch
|
||||
</h2>
|
||||
<p className="text-base font-medium leading-tight text-gray-900">{branchContext.label}</p>
|
||||
{branchContext.origin && (
|
||||
<p className="mt-2 text-sm leading-relaxed text-gray-600">
|
||||
Trying to understand: {branchContext.origin}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* ── Open questions (case workspace) — no ranking bias ── */}
|
||||
{(() => {
|
||||
const openNodes = graph.nodes.filter(
|
||||
@@ -1104,9 +1120,9 @@ export default function ReasoningWorkspace({
|
||||
{hasCurrentSummaryCondition && (
|
||||
<>
|
||||
<CurrentUnderstandingCard currentSummary={graph?.currentSummary || result?.updatedSituationGraph?.currentSummary} plainLanguage={propUnderstanding || null} />
|
||||
{/* ── Experiment 12: progress panel A / B / C toggle (temporary experimental UI) ── */}
|
||||
{/* ── Experiment 12: progress panel A / B / C toggle (temporary experimental UI) — de-emphasised by branch-as-context experiment RTO.25D */}
|
||||
{hasGraph && (
|
||||
<div className="space-y-2">
|
||||
<div className="hidden space-y-2">
|
||||
<div className="flex items-center gap-2" role="radiogroup" aria-label="Progress panel variant">
|
||||
<button
|
||||
role="radio"
|
||||
|
||||
@@ -543,6 +543,11 @@ export default function ScenarioForm() {
|
||||
<div className="grid grid-cols-1 gap-6 lg:grid-cols-4">
|
||||
{/* Workspace (3/4) */}
|
||||
<div className="lg:col-span-3">
|
||||
{/* Build branch context for the active branch */}
|
||||
{(() => {
|
||||
const activeBranch = BRANCHES.find(b => b.id === activeBranchId);
|
||||
const branchContext = activeBranch ? { label: activeBranch.label, origin: activeBranch.origin } : null;
|
||||
return (
|
||||
<ReasoningWorkspace
|
||||
scenario={scenario}
|
||||
status={status}
|
||||
@@ -560,6 +565,7 @@ export default function ScenarioForm() {
|
||||
setAnswer={setAnswer}
|
||||
onAnswerSubmit={handleUpdate}
|
||||
lastSubmittedAnswer={lastSubmittedAnswer}
|
||||
branchContext={branchContext}
|
||||
onRestart={() => {
|
||||
clearSession();
|
||||
setStatus("idle");
|
||||
@@ -572,6 +578,8 @@ export default function ScenarioForm() {
|
||||
setUpdateError(null);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
})()}
|
||||
</div>
|
||||
|
||||
{/* Branch switcher (1/4 sidebar) */}
|
||||
|
||||
Reference in New Issue
Block a user