Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

refactor([issue-1177]): derive Brain full-bleed set from the TABS registry

[._.]/ Adam Eivy646ccc617966
diff --git a/client/src/components/brain/constants.js b/client/src/components/brain/constants.js
index da0cf2f039..631a510e00 100644
--- a/client/src/components/brain/constants.js
+++ b/client/src/components/brain/constants.js
@@ -1,13 +1,16 @@
import { MessageSquare, Database, Calendar, Rss, Shield, Users, FolderKanban, Lightbulb, ClipboardList, Settings, Link2, BookOpen, Network, FileText, NotebookPen, Upload } from 'lucide-react';
-// Main navigation tabs
+// Main navigation tabs.
+// `fullBleed: true` marks a tab that fills the available height and owns its
+// own internal scroll — Brain renders these inside an overflow-hidden wrapper
+// with no padding (the rest scroll inside a padded wrapper). See issue #1177.
export const TABS = [
{ id: 'inbox', label: 'Inbox', icon: MessageSquare },
- { id: 'daily-log', label: 'Daily Log', icon: NotebookPen },
+ { id: 'daily-log', label: 'Daily Log', icon: NotebookPen, fullBleed: true },
{ id: 'links', label: 'Links', icon: Link2 },
{ id: 'memory', label: 'Memory', icon: Database },
- { id: 'notes', label: 'Notes', icon: FileText },
- { id: 'graph', label: 'Graph', icon: Network },
+ { id: 'notes', label: 'Notes', icon: FileText, fullBleed: true },
+ { id: 'graph', label: 'Graph', icon: Network, fullBleed: true },
{ id: 'digest', label: 'Digest', icon: Calendar },
{ id: 'feeds', label: 'Feeds', icon: Rss },
{ id: 'trust', label: 'Trust', icon: Shield },
@@ -15,6 +18,9 @@ export const TABS = [
{ id: 'config', label: 'Config', icon: Settings }
];
+// Tab ids that render full-bleed (derived from TABS so the list can't drift).
+export const FULL_BLEED_TAB_IDS = new Set(TABS.filter((t) => t.fullBleed).map((t) => t.id));
+
// Memory sub-tabs for entity types (alphabetical)
export const MEMORY_TABS = [
{ id: 'admin', label: 'Admin', icon: ClipboardList },
diff --git a/client/src/components/brain/tabs/NotesTab.jsx b/client/src/components/brain/tabs/NotesTab.jsx
index fb3d4b3bac..a9f42cfc90 100644
--- a/client/src/components/brain/tabs/NotesTab.jsx
+++ b/client/src/components/brain/tabs/NotesTab.jsx
@@ -510,7 +510,7 @@ export default function NotesTab({ onRefresh }) {
)}
{/* Note content */}
- <div className="flex-1 overflow-auto flex">
+ <div className="flex-1 min-h-0 overflow-auto flex">
{/* Main content area */}
<div className="flex-1 min-w-0">
{editing ? (
diff --git a/client/src/pages/Brain.jsx b/client/src/pages/Brain.jsx
index 8d26c3fc14..b676a1553e 100644
--- a/client/src/pages/Brain.jsx
+++ b/client/src/pages/Brain.jsx
@@ -8,7 +8,7 @@ import TabPills from '../components/ui/TabPills';
import { useAutoRefetch } from '../hooks/useAutoRefetch';
import { sameJsonShape } from '../lib/sameJsonShape';
-import { TABS } from '../components/brain/constants';
+import { TABS, FULL_BLEED_TAB_IDS } from '../components/brain/constants';
import { timeAgo } from '../utils/formatters';
import InboxTab from '../components/brain/tabs/InboxTab';
@@ -26,17 +26,14 @@ import ImportTab from '../components/brain/tabs/ImportTab';
// graph tab is actually opened.
const BrainGraph = lazy(() => import('../components/brain/tabs/BrainGraph'));
-// Full-bleed tabs fill the available height and own their internal scroll, so
-// the shared content wrapper must NOT add padding or a second scrollbar for
-// them (that produced the double-scroll/clipping in issue #1177). Every other
-// tab is document-style and gets the padded, scrolling wrapper.
-const FULL_BLEED_TABS = new Set(['graph', 'daily-log', 'notes']);
-
export default function Brain() {
const { tab } = useParams();
const navigate = useNavigate();
const activeTab = tab || 'inbox';
- const fullBleed = FULL_BLEED_TABS.has(activeTab);
+ // Full-bleed tabs own their internal scroll and fill height, so the shared
+ // wrapper must NOT add padding or a second scrollbar (issue #1177). The set
+ // is derived from the TABS registry so it can't drift from the tab list.
+ const fullBleed = FULL_BLEED_TAB_IDS.has(activeTab);
// Let errors throw — `useAutoRefetch` preserves the last-good data on
// transient failures. `silent: true` keeps the 30s poll from spamming