Skip to content

Self-hosted MCP server + dashboard giving Claude Code, Cursor & Hermes agents shared long-term memory over a git-backed markdown vault. Agent-native, Obsidian-compatible second brain — markdown RAG, no vector DB.

feat(ui): activity-bar rail — icon nav left of the sidebar

Ronalds Palacis8dfaeddc6a80
diff --git a/app/(app)/layout.tsx b/app/(app)/layout.tsx
index ea94057..69ff275 100644
--- a/app/(app)/layout.tsx
+++ b/app/(app)/layout.tsx
@@ -1,11 +1,13 @@
"use client";
+import { ActivityBar } from "@/components/activity-bar";
import { Sidebar } from "@/components/sidebar";
import { CommandPalette } from "@/components/command-palette";
export default function AppLayout({ children }: { children: React.ReactNode }) {
return (
<div className="flex h-dvh overflow-hidden">
+ <ActivityBar />
<Sidebar />
<main className="relative flex-1 overflow-hidden">{children}</main>
<CommandPalette />
diff --git a/components/activity-bar.tsx b/components/activity-bar.tsx
new file mode 100644
index 0000000..32eac7c
--- /dev/null
+++ b/components/activity-bar.tsx
@@ -0,0 +1,44 @@
+"use client";
+
+import Link from "next/link";
+import { usePathname } from "next/navigation";
+import { GitBranch, Home, Network, Plug, Settings } from "lucide-react";
+import { ThemeToggle } from "./theme-toggle";
+
+const ITEMS = [
+ { href: "/", icon: Home, label: "Home", exact: true },
+ { href: "/graph", icon: Network, label: "Graph" },
+ { href: "/workspaces", icon: GitBranch, label: "Workspaces" },
+ { href: "/connect", icon: Plug, label: "Connect an agent" },
+ { href: "/settings", icon: Settings, label: "Settings" },
+];
+
+/** Icon rail left of the sidebar — the home for navigation + workspace/agent/settings controls. */
+export function ActivityBar() {
+ const pathname = usePathname();
+ return (
+ <aside className="flex h-dvh w-12 shrink-0 flex-col items-center gap-1 border-r border-border bg-sidebar py-2">
+ {ITEMS.map(({ href, icon: Icon, label, exact }) => {
+ const active = exact ? pathname === href : pathname.startsWith(href);
+ return (
+ <Link
+ key={href}
+ href={href}
+ aria-label={label}
+ className={`group relative inline-flex size-9 items-center justify-center rounded-md transition-colors ${
+ active ? "bg-accent text-foreground" : "text-muted-foreground hover:bg-accent/60 hover:text-foreground"
+ }`}
+ >
+ <Icon size={17} />
+ <span className="pointer-events-none absolute left-11 z-30 whitespace-nowrap rounded-md border border-border bg-popover px-2 py-1 text-xs opacity-0 shadow-md transition-opacity group-hover:opacity-100">
+ {label}
+ </span>
+ </Link>
+ );
+ })}
+ <div className="mt-auto">
+ <ThemeToggle />
+ </div>
+ </aside>
+ );
+}
diff --git a/components/sidebar.tsx b/components/sidebar.tsx
index 199e6ee..b091e52 100644
--- a/components/sidebar.tsx
+++ b/components/sidebar.tsx
@@ -1,13 +1,11 @@
"use client";
import useSWR, { useSWRConfig } from "swr";
-import Link from "next/link";
import { usePathname, useRouter } from "next/navigation";
import { useState } from "react";
-import { Search, Network, FilePlus, Zap, Plug, Settings } from "lucide-react";
+import { Search, FilePlus, Zap } from "lucide-react";
import { fetcher, type TreeNode } from "@/lib/client";
import { Tree } from "./tree";
-import { ThemeToggle } from "./theme-toggle";
import { WorkspaceSwitcher } from "./workspace-switcher";
const FALLBACK_NAME = process.env.NEXT_PUBLIC_APP_NAME || "Engram";
@@ -104,9 +102,6 @@ export function Sidebar() {
<button onClick={() => { setCreating((c) => !c); setCapturing(false); }} title="New note" className={iconBtn}>
<FilePlus size={14} />
</button>
- <Link href="/graph" title="Graph" className={iconBtn}>
- <Network size={14} />
- </Link>
</div>
{creating && (
@@ -153,33 +148,13 @@ export function Sidebar() {
</div>
)}
- <nav className="scrollbar-none flex-1 overflow-y-auto px-1">
+ <nav className="scrollbar-none flex-1 overflow-y-auto px-1 pb-2">
{data ? (
<Tree tree={data.tree} activePath={activePath} />
) : (
<div className="px-3 py-2 text-xs text-muted-foreground">Loading…</div>
)}
</nav>
-
- <div className="flex items-center justify-between border-t border-border px-2 py-1.5">
- <div className="flex items-center gap-1">
- <Link
- href="/connect"
- title="Connect an agent"
- className="inline-flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground"
- >
- <Plug size={14} />
- </Link>
- <Link
- href="/settings"
- title="Settings"
- className="inline-flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground"
- >
- <Settings size={14} />
- </Link>
- </div>
- <ThemeToggle />
- </div>
</aside>
);
}