feat: add one-turn situation graph update UI

This commit is contained in:
2026-08-02 09:43:42 +01:00
parent a948910ba8
commit a9bce79658
11 changed files with 901 additions and 42 deletions
+7 -2
View File
@@ -55,6 +55,11 @@ export default function SituationGraphView({
}) {
if (!situationGraph) return null;
const selectedQuestionText =
typeof selectedQuestion === "string"
? selectedQuestion
: selectedQuestion?.question ?? null;
const activeUnknown = situationGraph.activeUnknownNodeId
? situationGraph.nodes.find((node) => node.id === situationGraph.activeUnknownNodeId)
: null;
@@ -67,10 +72,10 @@ export default function SituationGraphView({
return (
<div className="space-y-4">
{selectedQuestion?.question && (
{selectedQuestionText && (
<section className="rounded-lg border-2 border-green-300 bg-green-50 p-5">
<h2 className="mb-2 text-base font-bold text-green-800">Selected Question</h2>
<p className="text-base font-medium text-gray-900">{selectedQuestion.question}</p>
<p className="text-base font-medium text-gray-900">{selectedQuestionText}</p>
</section>
)}