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: hide list filters from memory graph (#10529)
[._.]/ Adam Eivy1b8db70b1de7
diff --git a/client/src/components/cos/tabs/MemoryTab.jsx b/client/src/components/cos/tabs/MemoryTab.jsxindex 2ca3af4287..d99948caf5 100644--- a/client/src/components/cos/tabs/MemoryTab.jsx+++ b/client/src/components/cos/tabs/MemoryTab.jsx@@ -213,8 +213,8 @@ export default function MemoryTab({ apps = [] }) {</div></div>- {/* Search */}- <div className="flex gap-2">+ {/* Search and type filters only apply to the list and timeline. */}+ {view !== 'graph' && <div className="flex gap-2"><inputtype="text"value={searchQuery}@@ -239,14 +239,15 @@ export default function MemoryTab({ apps = [] }) {<X size={18} /></button>)}- </div>+ </div>}- {/* Source + Type Filters */}+ {/* Source selection scopes pending approvals in every view. */}<div className="flex flex-wrap items-center gap-2">- {/* Source filter */}+ <span className="text-xs text-gray-500">{view === 'graph' ? 'Pending approval source:' : 'Source:'}</span>{['all', 'cos', 'brain'].map(src => (<buttonkey={src}+ aria-pressed={sourceFilter === src}onClick={() => setSourceFilter(src)}className={`px-3 py-2 min-h-[36px] text-xs rounded-full border transition-colors flex items-center gap-1.5 ${sourceFilter === src@@ -259,10 +260,11 @@ export default function MemoryTab({ apps = [] }) {{src === 'all' ? 'All Sources' : src === 'cos' ? 'CoS' : 'Brain'}</button>))}- <span className="w-px h-5 bg-port-border" />- {MEMORY_TYPES.map(type => (+ {view !== 'graph' && <span className="w-px h-5 bg-port-border" />}+ {view !== 'graph' && MEMORY_TYPES.map(type => (<buttonkey={type}+ aria-pressed={filters.types.includes(type)}onClick={() => {const newTypes = filters.types.includes(type)? filters.types.filter(t => t !== type)diff --git a/client/src/components/cos/tabs/MemoryTab.live.test.jsx b/client/src/components/cos/tabs/MemoryTab.live.test.jsxindex 4e612c4737..a2f53c71c9 100644--- a/client/src/components/cos/tabs/MemoryTab.live.test.jsx+++ b/client/src/components/cos/tabs/MemoryTab.live.test.jsx@@ -81,6 +81,53 @@ beforeEach(() => {api.getMemoryBackendStatus.mockResolvedValue({ backend: 'postgres' });});+describe('MemoryTab graph filters', () => {+ it('hides list-only controls in graph mode and restores selections when returning', async () => {+ api.getMemories.mockResolvedValue({ memories: [activeMemory] });+ api.searchMemories.mockResolvedValue({ memories: [{ ...activeMemory, summary: 'Filtered summary' }] });+ renderTab();+ await screen.findAllByText('Original summary');+ fireEvent.click(screen.getByRole('button', { name: 'Brain' }));+ await waitFor(() => expect(api.getMemories).toHaveBeenCalledWith(+ expect.objectContaining({ appId: 'brain' }), expect.any(Object)+ ));++ fireEvent.click(screen.getByRole('button', { name: 'fact' }));+ fireEvent.change(screen.getByRole('textbox', { name: 'Search memories' }), { target: { value: 'saved query' } });+ fireEvent.click(screen.getByRole('button', { name: 'Search', exact: true }));+ await screen.findByText('Filtered summary');+ expect(screen.getByRole('button', { name: 'fact' })).toHaveAttribute('aria-pressed', 'true');++ fireEvent.click(screen.getByRole('button', { name: 'Graph' }));+ expect(screen.queryByRole('textbox', { name: 'Search memories' })).not.toBeInTheDocument();+ expect(screen.queryByRole('button', { name: 'fact' })).not.toBeInTheDocument();+ expect(screen.getByText('Pending approval source:')).toBeInTheDocument();+ expect(screen.getByRole('button', { name: 'Brain' })).toHaveAttribute('aria-pressed', 'true');++ fireEvent.click(screen.getByRole('button', { name: 'List' }));+ expect(screen.getByText('Source:')).toBeInTheDocument();+ expect(screen.getByRole('textbox', { name: 'Search memories' })).toHaveValue('saved query');+ expect(screen.getByRole('button', { name: 'fact' })).toHaveAttribute('aria-pressed', 'true');+ await waitFor(() => expect(api.searchMemories).toHaveBeenLastCalledWith(+ 'saved query', expect.objectContaining({ appId: 'brain' }), expect.any(Object)+ ));+ });++ it('keeps source selection scoped to pending approvals in graph mode', async () => {+ api.getMemories.mockImplementation(async params => ({ memories: params.appId === 'brain' ? [pending] : [] }));+ renderTab('/cos/memory?view=graph');+ await screen.findByText('Graph view');+ expect(screen.queryByRole('textbox', { name: 'Search memories' })).not.toBeInTheDocument();+ expect(screen.queryByRole('button', { name: 'fact' })).not.toBeInTheDocument();+ expect(screen.getByText('Pending approval source:')).toBeInTheDocument();+ fireEvent.click(screen.getByRole('button', { name: 'Brain' }));+ expect(await screen.findByText('A synthetic pending memory')).toBeInTheDocument();+ await waitFor(() => expect(api.getMemories).toHaveBeenCalledWith(+ expect.objectContaining({ status: 'pending_approval', appId: 'brain' }), expect.any(Object)+ ));+ });+});+describe('MemoryTab live approvals', () => {it('shows a newly pending memory when cos:memory:approval-needed arrives, without navigation', async () => {render(