ELNOR REPO READER TEXT MIRROR
Original path: Design Mockups/Archived Mockups/DOC20 Mockups and Design/DOC20 Archived Mockups/DOC20 Workspace Redo/Q_WORKSPACE_V1.jsx
Source repo: /Users/OpenClaw1/Elnor/Elnor Specs
Git branch: main
Git commit: dbaa25962edc11ab30e8d4ca1715f9ae5bf77331
Generated: 2026-06-09T01:23:58.539Z
---
import { useState, useRef, useCallback, useEffect } from "react";
// === DESIGN TOKENS (matched to existing Q mockups) ===
const font = { sans: "'Söhne','Helvetica Neue',-apple-system,BlinkMacSystemFont,sans-serif" };
const R = { sm: "6px", md: "10px", full: "9999px" };
const c = {
bgApp: "#F8F8F6", bgPanel: "#FFFFFF", bgPanelAlt: "#F9FAFB", bgCard: "#FFFFFF",
bgInput: "#EFF1F3", textPri: "#1A1D21", textSec: "#5E6570", textTer: "#8B919A",
accentBtn: "#31588c", warn: "#D97706", error: "#B04040", border: "#E0E2E5",
borderLight: "#ECEEF0", green: "#2E8B57", agentAv: "#a1a7aa",
p1: "#B04040", p2: "#D97706", p3: "#31588c", p4: "#8B919A"
};
// === SHARED COMPONENTS ===
const Ic = ({ d, size = 18, color, sw = 1.75 }) => (
);
const I = {
Plus: p => ,
X: p => ,
Check: p => ,
ChevD: p => ,
ChevR: p => ,
Search: p => ,
Spark: p => ,
MsgCircle: p => ,
Pin: p => ,
FileText: p => ,
Folder: p => ,
Calendar: p => ,
Mail: p => ,
Bell: p => ,
Clock: p => ,
Eye: p => ,
Copy: p => ,
Grip: p => ,
Sun: p => ,
Zap: p => ,
};
const Dot = ({ color, size = 8 }) => ;
const Btn = ({ children, primary, ghost, small, onClick, disabled, style: s }) => (
);
const Av = ({ letter, color, size = 20 }) =>
{letter}
;
// === DATA ===
const briefCards = [
{ id: "b1", type: "system", icon: "Bell", title: "System", items: [
{ text: "DOC15 red-team review completed — 3 findings flagged", time: "2h ago", accent: c.green },
{ text: "OneDrive sync paused — re-auth needed", time: "6h ago", accent: c.warn },
]},
{ id: "b2", type: "elnor", icon: "Spark", title: "Elnor Overnight", items: [
{ text: "Reviewed 3 Henderson deposition transcripts — flagged 2 citation issues in Chen depo", time: "5h ago" },
{ text: "Updated Quark patent landscape analysis with 4 new filings", time: "4h ago" },
{ text: "Scanned SEC filings — no new Henderson-relevant 10-K amendments", time: "3h ago" },
]},
{ id: "b3", type: "calendar", icon: "Calendar", title: "Deadlines", items: [
{ text: "Expert disclosure deadline — Folb v. City of LA", time: "47 days", accent: c.error },
{ text: "Henderson MSJ response due", time: "12 days", accent: c.warn },
{ text: "Danny Christensen engagement call", time: "Tomorrow 2pm" },
]},
{ id: "b4", type: "mail", icon: "Mail", title: "Emails to Respond", items: [
{ text: "Sparacino — Narayanan local counsel agreement redline", time: "Yesterday" },
{ text: "Opposing counsel — Henderson discovery extension request", time: "2d ago", accent: c.warn },
]},
{ id: "b5", type: "news", icon: "Zap", title: "Watched Topics", items: [
{ text: "SEC announces new cybersecurity disclosure rules effective Q2", time: "Today" },
{ text: "9th Circuit: new opinion on securities fraud scienter standard", time: "Yesterday", accent: c.accentBtn },
]},
];
const initTodos = [
{ id: "t1", text: "Draft expert disclosure for Danny Christensen", done: false, priority: 1, due: "Apr 4", notes: "CCP § 2034 requirements. Need qualifications, opinions, basis.", project: "Folb v. City of LA", sub: [
{ id: "t1a", text: "Pull Christensen CV from engagement file", done: true },
{ id: "t1b", text: "List all opinions to be offered", done: false },
{ id: "t1c", text: "Identify documents reviewed", done: false },
]},
{ id: "t2", text: "Review Henderson MSJ opposition brief — Elnor's tracked changes", done: false, priority: 1, due: "Mar 20", project: "Henderson", sub: [] },
{ id: "t3", text: "Respond to Sparacino re: Narayanan local counsel agreement", done: false, priority: 2, due: "Mar 19", notes: "Check NY/CA choice-of-law for restrictive covenant.", sub: [] },
{ id: "t4", text: "Follow up with opposing counsel on discovery extension", done: false, priority: 2, due: "Mar 19", project: "Henderson", sub: [] },
{ id: "t5", text: "Review Quark patent analysis — new filings flagged overnight", done: false, priority: 3, due: null, project: "Quark", sub: [] },
{ id: "t6", text: "Update standing orders for new SEC cyber rules", done: false, priority: 3, due: null, sub: [] },
{ id: "t7", text: "File Folb trial exhibit list", done: true, priority: 2, due: "Mar 17", project: "Folb v. City of LA", sub: [] },
];
const noteContent = {
title: "Henderson MSJ — Work Notes",
body: [
{ type: "h2", text: "Key Arguments to Strengthen" },
{ type: "p", text: "1. Scienter — CFO Chen's \"do NOT share\" email is strongest evidence. Cross-ref with internal audit (Ex. 47). Elnor flagged additional Chen emails from July board prep." },
{ type: "p", text: "2. Loss causation — need Bloomberg data for exact trading window. Stock drop 34% on Oct 15 disclosure." },
{ type: "ai_comment", author: "Elnor", text: "I found 3 additional Chen emails from the July board prep folder that strengthen scienter. Want me to pull the relevant excerpts into this note?", time: "2h ago" },
{ type: "h2", text: "Outstanding Research" },
{ type: "p", text: "- Check if Vivendi citation is still good law in 2d Cir — Elnor reviewing" },
{ type: "p", text: "- PSLRA safe harbor scope after Omnicare — need to distinguish" },
{ type: "p", text: "- Damages calculation methodology — waiting on Christensen" },
{ type: "h2", text: "Deposition Notes" },
{ type: "p", text: "Chen depo key admissions: knew projections were stale by June 28, presented \"strong growth\" narrative anyway at July earnings call." },
]
};
// === MAIN COMPONENT ===
export default function WorkspaceMockup() {
const [todos, setTodos] = useState(initTodos);
const [expandedTodo, setExpandedTodo] = useState("t1");
const [briefCollapsed, setBriefCollapsed] = useState(new Set());
const [briefDismissed, setBriefDismissed] = useState(new Set());
const [activeTab, setActiveTab] = useState("today"); // today | notes | viewer
const [rightPanel, setRightPanel] = useState(null); // null | "comments" | "ask"
const [newTodoText, setNewTodoText] = useState("");
const [showBrief, setShowBrief] = useState(true);
const [editingNote, setEditingNote] = useState(true);
const toggleTodo = (id) => setTodos(prev => prev.map(t => t.id === id ? { ...t, done: !t.done } : t));
const toggleSub = (parentId, subId) => setTodos(prev => prev.map(t => t.id === parentId ? { ...t, sub: t.sub.map(s => s.id === subId ? { ...s, done: !s.done } : s) } : t));
const toggleBriefCard = (id) => setBriefCollapsed(prev => { const n = new Set(prev); n.has(id) ? n.delete(id) : n.add(id); return n; });
const dismissBrief = (id) => setBriefDismissed(prev => new Set([...prev, id]));
const priColor = (p) => p === 1 ? c.p1 : p === 2 ? c.p2 : p === 3 ? c.p3 : c.p4;
const priLabel = (p) => p === 1 ? "P1" : p === 2 ? "P2" : p === 3 ? "P3" : "P4";
const iconForBrief = (type) => {
if (type === "system") return ;
if (type === "elnor") return ;
if (type === "calendar") return ;
if (type === "mail") return ;
if (type === "news") return ;
return ;
};
const activeTodos = todos.filter(t => !t.done);
const doneTodos = todos.filter(t => t.done);
const visibleBriefs = briefCards.filter(b => !briefDismissed.has(b.id));
return (
{/* === BROWSER COLUMN (left) === */}
{/* Scope chips */}
{["Collection", "Project", "Bucket", "Folders"].map(s => (
{s}
))}
{/* Type chips */}
{["Doc", "Chat", "Note", "Task", "Artifact", "Agent"].map(t => (
{t}
))}
+6
{/* Browser items */}
{[
{ title: "Henderson MSJ — Work Notes", type: "Note", time: "2h", pin: true },
{ title: "Henderson discovery analysis", type: "Chat", time: "2m", unread: true },
{ title: "MSJ Response Brief v3", type: "Artifact", time: "10m" },
{ title: "Weekly Task List", type: "Note", time: "4h", pin: true },
{ title: "Quark Patent Analysis", type: "Note", time: "1d" },
{ title: "Review batch #4", type: "Task", time: "2h", status: "running" },
{ title: "Henderson_Complaint.pdf", type: "Doc", time: "1d" },
{ title: "Judge Chen Conference Notes", type: "Note", time: "3d" },
{ title: "Privilege Log Summary v3", type: "Artifact", time: "3d" },
].map((item, i) => (
e.currentTarget.style.backgroundColor = c.bgPanelAlt}
onMouseLeave={e => e.currentTarget.style.backgroundColor = "transparent"}>
{item.pin && }
{item.unread && }
{item.title}
{item.status && {item.status}}
{item.time}
))}
All · Modified · 9 items
{/* === MAIN WORKSPACE (center) === */}
{/* Workspace header */}
Wednesday, March 18
Good morning, Will
{/* Tab bar */}
{[
{ id: "today", label: "Today" },
{ id: "notes", label: "Notes" },
{ id: "viewer", label: "Documents" },
].map(tab => (
))}
{/* Content area */}
{/* Left: Note editor / Document viewer */}
{/* Editor toolbar */}
EDITING
● Saved
{/* Note content */}
{noteContent.title}
{noteContent.body.map((block, i) => {
if (block.type === "h2") return
{block.text}
;
if (block.type === "ai_comment") return (
Elnor
{block.time}
{block.text}
Yes, pull them in
Dismiss
Reply
);
return
{block.text}
;
})}
{/* Note metadata footer */}
Henderson v. DataCorp
·
Last edited 2h ago
·
3 comments
·
2 pending Elnor changes
{/* Right: To-Do + Brief */}
{/* To-Do header */}
To Do
{activeTodos.length}
{/* === DAILY BRIEF CARDS === */}
{showBrief && visibleBriefs.length > 0 && (
{visibleBriefs.map(card => (
toggleBriefCard(card.id)} style={{ display: "flex", alignItems: "center", gap: 6, padding: "6px 10px", cursor: "pointer", backgroundColor: c.bgPanelAlt }}>
{iconForBrief(card.type)}
{card.title}
{card.items.length}
{!briefCollapsed.has(card.id) && (
{card.items.map((item, i) => (
{item.accent && }
{item.text}
{item.time}
))}
)}
))}
)}
{/* === TO-DO LIST === */}
{activeTodos.map(todo => (
{/* Main row */}
setExpandedTodo(expandedTodo === todo.id ? null : todo.id)}>
toggleTodo(todo.id)} onClick={e => e.stopPropagation()} style={{ width: 14, height: 14, accentColor: c.accentBtn, marginTop: 2, flexShrink: 0 }} />
{todo.text}
{priLabel(todo.priority)}
{todo.due && {todo.due}}
{todo.project && · {todo.project}}
{todo.sub.length > 0 && {todo.sub.filter(s => s.done).length}/{todo.sub.length} subtasks}
{/* Expanded detail */}
{expandedTodo === todo.id && (
{todo.notes &&
{todo.notes}
}
{/* Subtasks */}
{todo.sub.length > 0 && (
{todo.sub.map(sub => (
toggleSub(todo.id, sub.id)} style={{ width: 12, height: 12, accentColor: c.accentBtn }} />
{sub.text}
))}
)}
{/* Action row */}
Ask Elnor
Subtask
Note
)}
))}
{/* Add todo */}
setNewTodoText(e.target.value)} placeholder="Add a task…" onKeyDown={e => {
if (e.key === "Enter" && newTodoText.trim()) {
setTodos(prev => [...prev, { id: "t" + Date.now(), text: newTodoText, done: false, priority: 3, due: null, sub: [] }]);
setNewTodoText("");
}
}} style={{ flex: 1, border: "none", outline: "none", fontSize: 11.5, fontFamily: font.sans, backgroundColor: "transparent", color: c.textPri }} />
{/* Completed section */}
{doneTodos.length > 0 && (
Completed ({doneTodos.length})
{doneTodos.map(todo => (
toggleTodo(todo.id)} style={{ width: 13, height: 13, accentColor: c.accentBtn }} />
{todo.text}
))}
)}
{/* === RIGHT PANEL (Comments / Ask Elnor) === */}
{rightPanel && (
{rightPanel === "comments" && (
<>
{[
{ author: "You", body: "Need to strengthen scienter argument — Chen emails are key.", time: "2h ago", anchor: "CFO Chen's \"do NOT share\" email" },
{ author: "Elnor", body: "Found 3 additional Chen emails from July board prep. Also suggest cross-referencing Ex. 47 audit report for timeline support.", time: "2h ago", isAgent: true },
{ author: "You", body: "Check Vivendi cite — still good law?", time: "1h ago", anchor: "In re Vivendi Universal" },
].map((cm, i) => (
{cm.anchor &&
"{cm.anchor}"
}
{cm.body}
Reply
Resolve
✨
))}
Add comment…
>
)}
{rightPanel === "ask" && (
Context
Full note + to-do list visible to agent
Ask Elnor
Elnor can see this note, your to-do list, and all comments. He can edit the note, add comments, update tasks, or respond in chat.
)}
)}
{/* === CHAT PANEL INDICATOR (right edge) === */}
);
}