// ========================================================================== // Shell: left rail (threads + agents), composer (with real file input), // canvas header. All driven from the store. // ========================================================================== function LeftRail() { const { me, threads, currentThread, route, navigate, createThread, deleteThread, resetAll, briefings, agents } = useStore(); const [hoverThreadId, setHoverThreadId] = React.useState(null); const handleReset = async () => { if (!confirm('Reset everything? This wipes:\n- All threads, messages, artifacts (localStorage)\n- All server-side CD sessions and CDBriefs\n\nThe page will reload.')) return; await resetAll(); }; // Editorial issue line — the "Studio №" masthead reads as a magazine issue. // Volume rotates by month; folio counts the threads as the catalogue. const today = new Date(); const volume = `Vol. ${String(today.getFullYear()).slice(-2)}.${String(today.getMonth() + 1).padStart(2, '0')}`; const folio = String((threads || []).length).padStart(3, '0'); const briefingsBadge = (briefings || []).filter(b => ['in_creative_review', 'in_business_review'].includes(b.status)).length; const agentsBadge = (agents || []).filter(a => a.unread).length; return (