// Shell: sidebar + topbar + inbox panel + command palette
const Sidebar = ({ view, setView, collapsed }) => {
const nav = [
{ id: "home", label: "Home", icon: "home" },
{ id: "inbox", label: "Inbox", icon: "inbox", badge: 4 },
{ id: "issues", label: "Issues", icon: "issues" },
{ id: "sprints", label: "Sprints", icon: "sprint" },
{ id: "roadmap", label: "Roadmap", icon: "roadmap" },
{ id: "docs", label: "Docs", icon: "docs" },
{ id: "chat", label: "VaultMind AI", icon: "sparkle" },
{ id: "code", label: "Code Editor", icon: "code" },
{ id: "compute", label: "Compute", icon: "sprint" },
{ id: "aimarket", label: "AI Infrastructure", icon: "bolt" },
{ id: "nexus", label: "Nexus", icon: "sparkle" },
{ id: "prs", label: "Pull requests", icon: "pr" },
{ id: "team", label: "Team", icon: "team" },
{ id: "settings", label: "Settings", icon: "settings" },
];
return (
);
};
const Topbar = ({ view, onToggleSidebar, onOpenPalette, onOpenInbox, onOpenTweaks, theme, setTheme }) => {
const crumb = {
home: ["Home"],
inbox: ["Inbox", "All activity"],
issues: ["Projects", "Aurora", "Issues"],
sprints: ["Sprints", "Iteration 42"],
roadmap: ["Roadmap", "Q2 — Q3 2026"],
docs: ["Docs", "Engineering handbook", "ADR 041 — Canvas rendering pipeline"],
prs: ["Code", "Pull requests"],
team: ["Team", "Members"],
issue: ["Projects", "Aurora", "AUR-412"],
chat: ["VaultMind AI", "Chat"],
compute: ["Compute", "GPU Instances"],
aimarket: ["AI Infrastructure", "Studios & Models"],
nexus: ["Nexus", "Cloud AI Platform"],
settings: ["Settings", "Workspace"],
}[view] || ["Home"];
return (
{crumb.map((c, i) => (
{i > 0 && /}
{c}
))}
);
};
// ---- Command palette ----
const PALETTE_ITEMS = [
{ group: "Jump to", items: [
{ id: "p-home", label: "Home", icon: "home", kbd: "G H", action: (setView) => setView("home") },
{ id: "p-inbox", label: "Inbox", icon: "inbox", kbd: "G I", action: (setView) => setView("inbox") },
{ id: "p-issues", label: "Issues", icon: "issues", kbd: "G S", action: (setView) => setView("issues") },
{ id: "p-docs", label: "Docs", icon: "docs", kbd: "G D", action: (setView) => setView("docs") },
{ id: "p-roadmap", label: "Roadmap", icon: "roadmap", kbd: "G R", action: (setView) => setView("roadmap") },
{ id: "p-prs", label: "Pull requests", icon: "pr", kbd: "G P", action: (setView) => setView("prs") },
{ id: "p-sprints", label: "Sprints", icon: "sprint", action: (setView) => setView("sprints") },
]},
{ group: "Create", items: [
{ id: "c-issue", label: "Create new issue…", icon: "plus", kbd: "C", action: () => window.openNewIssue() },
{ id: "c-doc", label: "Create new document…", icon: "doc-add", kbd: "⌘⇧D", action: () => window.openNewDoc() },
{ id: "c-pr", label: "Open pull request…", icon: "pr", action: () => window.openNewPR() },
]},
{ group: "Recent", items: [
{ id: "r-1", label: "AUR-412 — Rebuild canvas-rendering pipeline", icon: "issues", action: (setView) => setView("issue") },
{ id: "r-2", label: "Aurora collaborative canvas PRD", icon: "docs", action: (setView) => setView("docs") },
{ id: "r-3", label: "#2341 perf(canvas): tile-based rendering", icon: "pr", action: (setView) => setView("prs") },
{ id: "r-4", label: "Iteration 42 — Apr 14 – Apr 28", icon: "sprint", action: (setView) => setView("sprints") },
]},
{ group: "Ask Meridian AI", items: [
{ id: "ai-1", label: "Summarize Iteration 42 progress", icon: "sparkle", action: (setView) => { window.chatInitialQuery = "Summarize Iteration 42 progress"; setView("chat"); } },
{ id: "ai-2", label: "What's blocking Aurora?", icon: "sparkle", action: (setView) => { window.chatInitialQuery = "What's blocking Aurora?"; setView("chat"); } },
{ id: "ai-3", label: "Draft release notes for last sprint", icon: "sparkle", action: (setView) => { window.chatInitialQuery = "Draft release notes for last sprint"; setView("chat"); } },
]},
];
const CommandPalette = ({ open, onClose, setView }) => {
const [q, setQ] = React.useState("");
const [sel, setSel] = React.useState(0);
React.useEffect(() => {
if (!open) { setQ(""); setSel(0); }
}, [open]);
const all = React.useMemo(() => {
const query = q.trim().toLowerCase();
return PALETTE_ITEMS.map(g => ({
...g,
items: g.items.filter(it => !query || it.label.toLowerCase().includes(query))
})).filter(g => g.items.length);
}, [q]);
const flat = all.flatMap(g => g.items);
const go = (it) => {
if (it.action) it.action(setView);
onClose();
};
const onKey = (e) => {
if (e.key === "ArrowDown") { e.preventDefault(); setSel(s => Math.min(s + 1, flat.length - 1)); }
else if (e.key === "ArrowUp") { e.preventDefault(); setSel(s => Math.max(s - 1, 0)); }
else if (e.key === "Enter") { const it = flat[sel]; if (it) go(it); }
else if (e.key === "Escape") onClose();
};
if (!open) return null;
return (
e.stopPropagation()}>
{ setQ(e.target.value); setSel(0); }}
onKeyDown={onKey}
/>
ESC
{all.map((g, gi) => (
{g.group}
{g.items.map((it) => {
const idx = flat.indexOf(it);
return (
);
})}
))}
);
};
// ---- Inbox panel ----
const InboxPanel = ({ open, onClose }) => {
const [filter, setFilter] = React.useState("all");
const list = INBOX.filter(n => filter === "all" || (filter === "unread" && n.unread));
const kindIcon = { issue: "issues", pr: "pr", doc: "docs" };
return (
);
};
// ---- Tweaks panel ----
const TweaksPanel = ({ open, onClose, settings, setSettings }) => {
const accents = [
{ id: "lime", value: "oklch(0.85 0.17 145)" },
{ id: "cyan", value: "oklch(0.78 0.13 220)" },
{ id: "violet", value: "oklch(0.72 0.18 300)" },
{ id: "amber", value: "oklch(0.80 0.14 75)" },
{ id: "rose", value: "oklch(0.72 0.17 20)" },
];
return (
Tweaks
{accents.map(a => (
{["dark","light"].map(t => (
))}
{["compact","default","relaxed"].map(d => (
))}
{["expanded","collapsed"].map(d => (
))}
{["detailed","minimal"].map(d => (
))}
);
};
const HintBar = ({ onOpenPalette }) => (
⌘K search
C new issue
G+I inbox
? help
);
Object.assign(window, { Sidebar, Topbar, CommandPalette, InboxPanel, TweaksPanel, HintBar });