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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: address review on the Brain IdeaLoom lists wiring (#5337)
[._.]/ Adam Eivy110750f837f1
diff --git a/client/src/components/brain/IdeaLoomLists.jsx b/client/src/components/brain/IdeaLoomLists.jsxindex 317a1c2d67..746e7443f4 100644--- a/client/src/components/brain/IdeaLoomLists.jsx+++ b/client/src/components/brain/IdeaLoomLists.jsx@@ -1,10 +1,10 @@import { useCallback, useEffect, useMemo, useState } from 'react';-import { useSearchParams } from 'react-router';import { ArrowDown, ArrowUp, CheckCircle2, Plus, Save, Trash2, X } from 'lucide-react';import * as api from '../../services/api';import toast from '../ui/Toast';import InlineConfirmRow from '../ui/InlineConfirmRow';import { useConfirmDelete } from '../../hooks/useConfirmDelete';+import useUrlParams from '../../hooks/useUrlParams';const emptyList = () => ({ title: '', prompt: '', category: '', help: '', status: 'draft', ideas: [] });@@ -21,8 +21,11 @@ const toPayload = (draft) => ({});// Integration state never gates local editing — these are notices, not blockers.+// A null `settings` is "the fetch failed", NOT "the integration is off": reporting+// an unread configuration as disabled asserts a fact we never read.const integrationNotice = (settings) => {- if (!settings?.enabled) return 'Vault sync is disabled. Local lists remain available.';+ if (!settings) return 'Could not load IdeaLoom settings. Local lists remain available.';+ if (!settings.enabled) return 'Vault sync is disabled. Local lists remain available.';if (!settings.obsidianVaultId) return 'No Obsidian vault is selected. Local lists remain available.';return null;};@@ -39,7 +42,7 @@ const missingField = (draft) => {// The dedicated Ideas page owns both models, but this panel intentionally only// speaks the machine-local IdeaLoom list API. Native Brain ideas stay separate.export default function IdeaLoomLists() {- const [searchParams, setSearchParams] = useSearchParams();+ const [searchParams, updateParams] = useUrlParams();const selectedId = searchParams.get('list');const [lists, setLists] = useState([]);const [settings, setSettings] = useState(null);@@ -48,14 +51,7 @@ export default function IdeaLoomLists() {const [ideaText, setIdeaText] = useState('');const { isConfirming, requestDelete, cancelDelete, confirmDelete } = useConfirmDelete();- const select = useCallback((id) => {- setSearchParams((current) => {- const next = new URLSearchParams(current);- if (id) next.set('list', id);- else next.delete('list');- return next;- });- }, [setSearchParams]);+ const select = useCallback((id) => updateParams({ list: id }), [updateParams]);const load = useCallback(async () => {setLoading(true);diff --git a/client/src/components/brain/IdeaLoomLists.test.jsx b/client/src/components/brain/IdeaLoomLists.test.jsxindex 87a11b3132..e3294631d5 100644--- a/client/src/components/brain/IdeaLoomLists.test.jsx+++ b/client/src/components/brain/IdeaLoomLists.test.jsx@@ -75,6 +75,14 @@ describe('IdeaLoomLists', () => {expect(await screen.findByLabelText('Idea 1')).toBeTruthy();});+ it('does not report an unread settings fetch as a disabled integration', async () => {+ api.getIdeaLoomSettings.mockRejectedValue(new Error('Server unreachable'));+ renderPanel();++ expect(await screen.findByText('Could not load IdeaLoom settings. Local lists remain available.')).toBeTruthy();+ expect(screen.queryByText('Vault sync is disabled. Local lists remain available.')).toBeNull();+ });+it('reorders a selected list locally and saves only the schema fields', async () => {api.getIdeaLoomLists.mockResolvedValue([storedList()]);api.updateIdeaLoomList.mockResolvedValue(storedList({ ideas: ['Second', 'First'] }));diff --git a/client/src/components/brain/tabs/IdeasTab.jsx b/client/src/components/brain/tabs/IdeasTab.jsxindex d2983207ea..6ae76d27d2 100644--- a/client/src/components/brain/tabs/IdeasTab.jsx+++ b/client/src/components/brain/tabs/IdeasTab.jsx@@ -4,8 +4,8 @@// - "IdeaLoom lists" — machine-local ordered list documents (never federated)// The active view lives in the URL (`?view=lists`) so it is shareable,// bookmarkable, and reachable from ⌘K / voice, per client/src/AGENTS.md.-import { useSearchParams } from 'react-router';import { Lightbulb, ListOrdered } from 'lucide-react';+import useUrlParams from '../../../hooks/useUrlParams';import TabPills from '../../ui/TabPills';import MemoryTab from './MemoryTab';import IdeaLoomLists from '../IdeaLoomLists';@@ -18,22 +18,16 @@ const VIEWS = [];export default function IdeasTab({ onRefresh }) {- const [searchParams, setSearchParams] = useSearchParams();+ const [searchParams, updateParams] = useUrlParams();const view = searchParams.get('view') === LISTS_VIEW ? LISTS_VIEW : 'ideas';- const changeView = (next) => {- setSearchParams((current) => {- const params = new URLSearchParams(current);- if (next === LISTS_VIEW) {- params.set('view', LISTS_VIEW);- } else {- params.delete('view');- // `list` addresses an IdeaLoom list; it is meaningless on the native view.- params.delete('list');- }- return params;- });- };+ // `list` addresses an IdeaLoom list, so it clears with the view that owns it.+ // Flipping a view replaces rather than pushes — Back should leave the page,+ // not walk the user back through every pill they clicked.+ const changeView = (next) => updateParams(+ next === LISTS_VIEW ? { view: LISTS_VIEW } : { view: null, list: null },+ { replace: true },+ );return (<div className="flex flex-col gap-3">diff --git a/client/src/components/brain/tabs/IdeasTab.test.jsx b/client/src/components/brain/tabs/IdeasTab.test.jsxindex 23a41a63fd..61fa971957 100644--- a/client/src/components/brain/tabs/IdeasTab.test.jsx+++ b/client/src/components/brain/tabs/IdeasTab.test.jsx@@ -57,6 +57,6 @@ describe('IdeasTab', () => {const clientSrc = join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..');const brainPage = readFileSync(join(clientSrc, 'pages', 'Brain.jsx'), 'utf8');expect(brainPage).toContain("import('../components/brain/tabs/IdeasTab')");- expect(brainPage).toMatch(/case 'ideas':\s*\n\s*return <IdeasTab /);+ expect(brainPage).toMatch(/case 'ideas':[\s\S]{0,120}<IdeasTab\b/);});});diff --git a/server/lib/navManifest.js b/server/lib/navManifest.jsindex 91e518e651..46cfa3b169 100644--- a/server/lib/navManifest.js+++ b/server/lib/navManifest.js@@ -132,7 +132,8 @@ const RAW_NAV_COMMANDS = [{ id: 'nav.brain.digest', path: '/brain/digest', label: 'Digest', section: 'Brain', aliases: ['brain-digest'] },{ id: 'nav.brain.feeds', path: '/brain/feeds', label: 'Feeds', section: 'Brain', aliases: ['brain-feeds', 'feeds', 'rss'], keywords: ['rss', 'subscriptions'] },{ id: 'nav.brain.graph', path: '/brain/graph', label: 'Graph', section: 'Brain', aliases: ['brain-graph'] },- { id: 'nav.brain.ideas', path: '/brain/ideas', label: 'Ideas', section: 'Brain', aliases: ['brain-ideas', 'ideas'], keywords: ['brainstorm', 'creative', 'thought', 'concept', 'idealoom', 'idea loom'] },+ { id: 'nav.brain.ideas', path: '/brain/ideas', label: 'Ideas', section: 'Brain', aliases: ['brain-ideas', 'ideas'], keywords: ['brainstorm', 'creative', 'thought', 'concept'] },+ { id: 'nav.brain.idealoom', path: '/brain/ideas?view=lists', label: 'IdeaLoom Lists', section: 'Brain', aliases: ['idealoom', 'idea-loom', 'idealoom-lists'], keywords: ['obsidian', 'vault', 'ordered list', 'local lists'] },{ id: 'nav.brain.import', path: '/brain/import', label: 'Import', section: 'Brain', aliases: ['brain-import', 'import-chatgpt', 'chatgpt-import'], keywords: ['chatgpt', 'openai', 'export', 'third-party'] },{ id: 'nav.brain.links', path: '/brain/links', label: 'Links', section: 'Brain', aliases: ['brain-links'] },{ id: 'nav.brain.memory', path: '/brain/memory', label: 'Memory', section: 'Brain', aliases: ['brain-memory', 'memory'] },