From 13b14fd01a1a98fad4a5a635a7e19c96862cd976 Mon Sep 17 00:00:00 2001 From: robbond Date: Mon, 3 Aug 2026 20:00:13 +0100 Subject: [PATCH] feat: allow earlier evidence to be revised --- components/reasoning-workspace.jsx | 234 ++++++++++++++++++++++++----- components/scenario-form.jsx | 59 +++++++- 2 files changed, 250 insertions(+), 43 deletions(-) diff --git a/components/reasoning-workspace.jsx b/components/reasoning-workspace.jsx index 5e1d4c7..db810c3 100644 --- a/components/reasoning-workspace.jsx +++ b/components/reasoning-workspace.jsx @@ -47,6 +47,13 @@ const UPDATE_MESSAGES = [ { min: 45, text: "Choosing the next question" }, ]; +const REVISION_MESSAGES = [ + { min: 0, text: "Reading what changed" }, + { min: 10, text: "Rebuilding the investigation" }, + { min: 25, text: "Checking what this affects" }, + { min: 45, text: "Choosing the next justified question" }, +]; + function useLoadingStatus(messages, isLoading) { const [elapsed, setElapsed] = useState(0); const startRef = useRef(null); @@ -76,6 +83,59 @@ function useLoadingStatus(messages, isLoading) { return { elapsed, currentMessage }; } +// ── Revision warning banner ───────────────────────────────── +function RevisionWarningCard() { + return ( +
+ Changing this answer may alter the questions and conclusions that followed it. +
+ ); +} + +// ── Revision inline editor ──────────────────────────────────── +function RevisionEditor({ turn, onSave, onCancel }) { + const [draft, setDraft] = useState(turn.answer); + + return ( +
+ +

{turn.question}

+