From c3faf5382367fdf42ae843d0679c73932de0352d Mon Sep 17 00:00:00 2001 From: robbond Date: Tue, 4 Aug 2026 17:14:50 +0100 Subject: [PATCH] feat: make investigation history readable --- components/reasoning-workspace.jsx | 41 +++++++++++++++++------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/components/reasoning-workspace.jsx b/components/reasoning-workspace.jsx index 88f1bf5..e65ccbf 100644 --- a/components/reasoning-workspace.jsx +++ b/components/reasoning-workspace.jsx @@ -193,29 +193,33 @@ function CurrentFocusCard({ graph }) { ); } -// ── Investigation history card ──────────────────────────────── +// ── Investigation history card (readable notebook style) ─────── function InvestigationHistoryCard({ turn }) { - const qSnippet = turn.question.length > 80 - ? turn.question.slice(0, 80) + "…" - : turn.question; + const isCollapsed = turn._collapsed; return ( -
- - {new Date(turn.timestamp).toLocaleString(undefined, { - month: "short", - day: "numeric", - hour: "2-digit", - minute: "2-digit", - })} — {qSnippet} +
+ + {isCollapsed ? "Q: " : "✓ "} + {turn.question.length > 60 && !isCollapsed + ? turn.question.slice(0, 60) + "…" + : turn.question} + {!isCollapsed && ( + — answered + )} -
-

Question

-

{turn.question}

-

You answered

+ +
+

Your answer

{turn.answer}

+ {turn.acknowledgement && ( <> +

What changed

{turn.acknowledgement}

@@ -229,6 +233,8 @@ function InvestigationHistoryCard({ turn }) { function InvestigationHistory({ turns }) { if (!turns || turns.length === 0) return null; + const latestId = turns[turns.length - 1].id; + return (

@@ -236,7 +242,7 @@ function InvestigationHistory({ turns }) {

{turns.map((turn) => ( - + ))}
@@ -403,7 +409,6 @@ export default function ReasoningWorkspace({ question: q, answer: answerText.trim(), acknowledgement: null, - timestamp: Date.now(), }; };