diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 337a527..1453d4c 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -15,7 +15,7 @@ import { SecurityGate } from "@/components/auth/SecurityGate"; import { TradePosition } from "@/components/positions/ActiveTradesTable"; import { AccountVaultModal, MT5AccountVaultItem } from "@/components/broker/AccountVaultModal"; import { useExnessWebSocket } from "@/hooks/useExnessWebSocket"; -import { KeyRound, Layers, ChevronRight } from "lucide-react"; +import { KeyRound, Layers, ChevronRight, ChevronLeft, Activity, Bot } from "lucide-react"; import { soundFX } from "@/lib/soundEffects"; export default function TitanQuantTerminalPage() { @@ -29,6 +29,43 @@ export default function TitanQuantTerminalPage() { orderType: "BUY" | "SELL"; } | null>(null); + // Interactive Collapsible Sidebars State (Left Radar & Right Quant Desk) + const [isLeftCollapsed, setIsLeftCollapsed] = useState(false); + const [isRightCollapsed, setIsRightCollapsed] = useState(false); + + useEffect(() => { + try { + const savedLeft = localStorage.getItem("aura_trade_left_collapsed"); + const savedRight = localStorage.getItem("aura_trade_right_collapsed"); + if (savedLeft === "true") setIsLeftCollapsed(true); + if (savedRight === "true") setIsRightCollapsed(true); + } catch (e) {} + }, []); + + const toggleLeftSidebar = () => { + soundFX.playClick(); + setIsLeftCollapsed((prev) => { + const next = !prev; + try { + localStorage.setItem("aura_trade_left_collapsed", String(next)); + } catch (e) {} + setTimeout(() => window.dispatchEvent(new Event("resize")), 320); + return next; + }); + }; + + const toggleRightSidebar = () => { + soundFX.playClick(); + setIsRightCollapsed((prev) => { + const next = !prev; + try { + localStorage.setItem("aura_trade_right_collapsed", String(next)); + } catch (e) {} + setTimeout(() => window.dispatchEvent(new Event("resize")), 320); + return next; + }); + }; + // Dynamic Multi-Account Vault State const [accounts, setAccounts] = useState([]); const [activeAccount, setActiveAccount] = useState(null); @@ -417,46 +454,79 @@ export default function TitanQuantTerminalPage() { - {/* 2. Dynamic Institutional Workspace (Pro, Focus, or Agentic Cockpit) */} -
+ {/* 2. Dynamic Institutional Workspace with Collapsible Sidebars */} +
- {/* Left Column (3 cols on xl in Pro mode): Multi-Asset Radar & Macro Calendar */} + {/* Left Column: Multi-Asset Radar & Macro Calendar (Collapsible) */} {workspaceMode === "pro" && ( - + isLeftCollapsed ? ( + /* Slim Collapsed Left Rail */ + + ) : ( + /* Expanded Left Sidebar */ + + ) )} {/* Center Stage: Dual-Engine Charting Stage & Cockpit Dock */} -
+
setActiveTimeframe(tf)} liveTick={packet?.tick || null} onOpenConnectModal={() => setShowVaultModal(true)} - isTheaterMode={workspaceMode === "focus"} - onToggleTheaterMode={() => setWorkspaceMode(workspaceMode === "focus" ? "pro" : "focus")} + isTheaterMode={workspaceMode === "focus" || (isLeftCollapsed && isRightCollapsed)} + onToggleTheaterMode={() => { + if (isLeftCollapsed && isRightCollapsed) { + setIsLeftCollapsed(false); + setIsRightCollapsed(false); + } else { + setIsLeftCollapsed(true); + setIsRightCollapsed(true); + } + }} exnessAccount={activeAccount ? String(activeAccount.account_id) : exnessAccount} exnessServer={activeAccount ? activeAccount.server : exnessServer} /> @@ -477,47 +547,80 @@ export default function TitanQuantTerminalPage() { />
- {/* Right Column: Hermes Agentic Copilot & Multi-Tier Execution Terminal */} + {/* Right Column: Hermes Agentic Copilot & Multi-Tier Execution Terminal (Collapsible) */} {workspaceMode !== "focus" && ( -
- + + {/* Hermes Agentic Copilot HUD */} +
+ { + soundFX.playOrderExecuted(); + setAgentSetup(setup); + }} + onTriggerAudit={fetchAnalysis} + /> +
+ + {/* Strict Sentinel Order Terminal */} +
+ +
+ + ) )}
diff --git a/frontend/src/components/agentic/AutonomousPilotToggle.tsx b/frontend/src/components/agentic/AutonomousPilotToggle.tsx index 33b175a..9363dbf 100644 --- a/frontend/src/components/agentic/AutonomousPilotToggle.tsx +++ b/frontend/src/components/agentic/AutonomousPilotToggle.tsx @@ -1,19 +1,21 @@ "use client"; import React, { useState } from "react"; -import { ShieldAlert, ShieldCheck, Zap, Radio, AlertTriangle } from "lucide-react"; +import { ShieldAlert, ShieldCheck, Zap, Radio, AlertTriangle, ChevronRight } from "lucide-react"; import { soundFX } from "@/lib/soundEffects"; interface AutonomousPilotToggleProps { isArmed: boolean; onToggle: (armed: boolean) => void; maxRiskDollars?: number; + onCollapse?: () => void; } export const AutonomousPilotToggle: React.FC = ({ isArmed, onToggle, maxRiskDollars = 0.15, + onCollapse, }) => { const handleToggle = () => { soundFX.playClick(); @@ -53,26 +55,41 @@ export const AutonomousPilotToggle: React.FC = ({ - + + {onCollapse && ( + )} - + ); }; diff --git a/frontend/src/components/radar/WatchlistRadar.tsx b/frontend/src/components/radar/WatchlistRadar.tsx index 940f37f..3b9c9de 100644 --- a/frontend/src/components/radar/WatchlistRadar.tsx +++ b/frontend/src/components/radar/WatchlistRadar.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useState } from "react"; -import { TrendingUp, TrendingDown, Search, Activity, Zap, CheckCircle2 } from "lucide-react"; +import { TrendingUp, TrendingDown, Search, Activity, Zap, CheckCircle2, ChevronLeft } from "lucide-react"; import { soundFX } from "@/lib/soundEffects"; export interface WatchlistAsset { @@ -72,12 +72,14 @@ interface WatchlistRadarProps { activeSymbol: string; onSelectSymbol: (symbol: string) => void; liveGoldTick?: { bid: number; ask: number; spread_pips: number } | null; + onCollapse?: () => void; } export const WatchlistRadar: React.FC = ({ activeSymbol, onSelectSymbol, liveGoldTick, + onCollapse, }) => { const [filter, setFilter] = useState(""); const [tab, setTab] = useState<"all" | "metals" | "forex" | "crypto">("all"); @@ -116,9 +118,23 @@ export const WatchlistRadar: React.FC = ({

Market Radar

- - LIVE - +
+ + LIVE + + {onCollapse && ( + + )} +
{/* Tabs */}