diff --git a/src/components/SystemsIntelligenceCanvas.jsx b/src/components/SystemsIntelligenceCanvas.jsx index 04661ac..4f6722b 100644 --- a/src/components/SystemsIntelligenceCanvas.jsx +++ b/src/components/SystemsIntelligenceCanvas.jsx @@ -1,18 +1,12 @@ -import React, { useState, useEffect, useMemo, useRef, useCallback } from "react"; +import React, { useState, useMemo, useCallback } from "react"; import { motion, AnimatePresence } from "framer-motion"; -import { - Activity, Cpu, Network, ShieldCheck, Zap, Radio, - Layers, Compass, Database, Terminal, RefreshCw, X, Info, CheckCircle2, - Server, GitCommit, ShieldAlert, ArrowUpRight, CpuIcon, BookOpen, - HelpCircle, Link2, Sparkles, Code2, ArrowRight, History, Lightbulb, - Workflow, Layers3, ChevronRight, Share2, CornerDownRight +import { + Layers, Compass, X, History, ChevronRight } from "lucide-react"; import clsx from "clsx"; import { twMerge } from "tailwind-merge"; import { useSpatial } from "../SpatialContext"; import { useSystemCommand } from "../context/SystemCommandContext"; -import EngineeringReviewPanel from "./EngineeringReviewPanel"; -import { CASE_STUDIES } from "../data/missions"; import { MICRO_EDUCATION_DB, MISSION_TOPOLOGIES, AMBIENT_NODES, AMBIENT_LINKS } from "../data/canvas-atlas"; import { mapReveal } from "../lib/motion"; @@ -29,18 +23,7 @@ export default function SystemsIntelligenceCanvas() { const [selectedNode, setSelectedNode] = useState(null); const [hoveredLink, setHoveredLink] = useState(null); const [selectedTech, setSelectedTech] = useState(null); - const [viewMode, setViewMode] = useState("presentation"); - const activeMissionData = useMemo(() => { - if (selectedMissionId) { - return CASE_STUDIES.find((m) => m.missionId === selectedMissionId) || CASE_STUDIES[0]; - } - return CASE_STUDIES[0]; - }, [selectedMissionId]); - - const [eventLogIndex, setEventLogIndex] = useState(0); - - // Phase 2: Engineering Memory (Session Exploration History Trail) const [explorationHistory, setExplorationHistory] = useState(() => { return [ { type: "mission", id: "ops-dronly", label: "ops.dronly.in" } @@ -49,34 +32,13 @@ export default function SystemsIntelligenceCanvas() { const addToHistory = useCallback((item) => { setExplorationHistory((prev) => { - // Avoid duplicate consecutive entries if (prev.length > 0 && prev[prev.length - 1].id === item.id) return prev; const filtered = prev.filter((x) => x.id !== item.id); return [...filtered.slice(-5), item]; }); }, []); - // Pillar 1: Live Pulse Traffic Density & Simulation Controls - const [trafficDensity, setTrafficDensity] = useState('NORMAL'); // 'NORMAL' | 'HIGH_LOAD' | 'FAILOVER' - const [manualBreakerTripped, setManualBreakerTripped] = useState(false); - - const isBreakerActive = manualBreakerTripped || trafficDensity === 'FAILOVER'; - - // Computed Dynamic Operations Telemetry Metrics - const pingRate = trafficDensity === 'FAILOVER' ? '142.0k pings/s' : trafficDensity === 'HIGH_LOAD' ? '68.5k pings/s' : '12.4k pings/s'; - const workerPool = trafficDensity === 'FAILOVER' ? '256 Workers' : trafficDensity === 'HIGH_LOAD' ? '128 Workers' : '64 Workers'; - const healthSLA = isBreakerActive ? '94.10% SHIELDED' : trafficDensity === 'HIGH_LOAD' ? '98.42% ARMED' : '99.98% NOMINAL'; - - // Packet animation speed - const packetAnimDuration = trafficDensity === 'FAILOVER' ? '0.5s' : trafficDensity === 'HIGH_LOAD' ? '1.2s' : '3.8s'; - - // Cycle telemetry event log ticker - useEffect(() => { - const interval = setInterval(() => { - setEventLogIndex((prev) => prev + 1); - }, 4000); - return () => clearInterval(interval); - }, []); + const packetAnimDuration = "3.8s"; const activeTopology = useMemo(() => { if (selectedMissionId && MISSION_TOPOLOGIES[selectedMissionId]) { @@ -87,15 +49,8 @@ export default function SystemsIntelligenceCanvas() { const currentNodes = activeTopology ? activeTopology.nodes : AMBIENT_NODES; const currentLinks = activeTopology ? activeTopology.links : AMBIENT_LINKS; - const currentEvents = activeTopology ? activeTopology.events : [ - "Systems Mesh active: Monitoring distributed nodes", - "Telemetry link integrity: 99.94% Nominal", - "Zero security vulnerabilities detected in active build", - "Select a Flagship Mission above to inspect full topology" - ]; - const themeColor = isBreakerActive ? "#f43f5e" : trafficDensity === 'HIGH_LOAD' ? "#fbbf24" : activeTopology ? activeTopology.hexColor : "#00f0ff"; - const themeText = isBreakerActive ? "text-rose-400" : trafficDensity === 'HIGH_LOAD' ? "text-amber-400" : activeTopology ? activeTopology.textClass : "text-cyan-electric"; + const themeColor = activeTopology ? activeTopology.hexColor : "#00f0ff"; // Helper to resolve node coordinates const getNodePos = useCallback((id) => { @@ -203,29 +158,6 @@ export default function SystemsIntelligenceCanvas() { ); })} - -