/** * Investigation Map — user-facing workspace card. * * Shows the progress of reasoning as a set of investigation topics with * simple status indicators. Does NOT expose graph internals. * * Design principles: * - Calm, spacious, accessible * - No percentages, no progress bars, no confidence scores * - Topics evolve naturally across turns */ import getInvestigationMapTopics from "@/lib/map/investigation-map-adapter"; /* ── Status icons (unicode — no icon library dependency) ─── */ const STATUS_ICONS = { established: "✓", current: "●", unknown: "○", }; function topicRowColor(status) { switch (status) { case "established": return "text-gray-900"; case "current": return "text-blue-800"; default: return "text-gray-400"; } } function topicIconColor(status) { switch (status) { case "established": return "text-green-600"; case "current": return "text-blue-500"; default: return "text-gray-300"; } } /* ── Single topic row ───────────────────────────────────── */ function TopicRow({ title, status }) { const icon = STATUS_ICONS[status]; const colorClass = topicRowColor(status); const iconColor = topicIconColor(status); const ariaLabel = `${status === "established" ? "Established" : status === "current" ? "Currently investigating" : "Still to explore"}: ${title}`; return (
{title}
); } /* ── Card wrapper ────────────────────────────────────────── */ export default function InvestigationMap({ turnCount = 0 }) { const topics = getInvestigationMapTopics(turnCount); // Group topics by status for cleaner rendering const groups = { established: topics.filter((t) => t.status === "established"), current: topics.filter((t) => t.status === "current"), unknown: topics.filter((t) => t.status === "unknown"), }; // Only render the card if there are non-established topics (during active investigation) const hasActiveTopics = groups.current.length > 0 || groups.unknown.length > 0; if (!hasActiveTopics && groups.established.length === 0) return null; return (

Investigation Map Preview

This preview shows where a future reasoning map may appear. Its final shape will emerge from the reasoning engine.

{topics.map((topic, i) => ( ))}
); }