The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed app/src/pages/Memory.tsx,app/src/pages/__tests__/Memory.test.tsx
Steven Enamakel5a565aeacbb6
diff --git a/app/src/pages/Memory.tsx b/app/src/pages/Memory.tsxindex d24a1a6400..59cfbfee63 100644--- a/app/src/pages/Memory.tsx+++ b/app/src/pages/Memory.tsx@@ -5,11 +5,12 @@* it has no route of its own. Connections owns `?tab=` and the sidebar; this* page keeps its chip in `?brain=`:*- * engine · ask · explorer · learnings · conversations · documents · context+ * engine · ask · explorer · learnings · conversations · brain · background · settings** With no `?brain=` the page opens on Ask when an engine is active and on- * Engine otherwise. Old v1 values (`graph`, `goals`, `sources`, `sync`,- * `history`) are rewritten to their v2 chip. While memory is off every chip+ * Engine otherwise. Retired values (v1's `graph`, `goals`, `sources`, `sync`,+ * `history`; v2's `documents` and `context`) are rewritten to their current+ * chip. While memory is off every chip* but Engine shows an empty state that points there.** debug logging: DEBUG=openhuman:memory@@ -19,15 +20,16 @@ import { useCallback, useEffect, useMemo, useState } from 'react';import { useLocation, useNavigate } from 'react-router-dom';import MemoryAskTab from '../components/memory/MemoryAskTab';+import MemoryBackgroundTab from '../components/memory/MemoryBackgroundTab';+import MemoryBrainTab from '../components/memory/MemoryBrainTab';import { type MemoryChip, resolveMemoryChip } from '../components/memory/memoryChips';-import MemoryContextTab from '../components/memory/MemoryContextTab';import MemoryConversationsTab from '../components/memory/MemoryConversationsTab';-import MemoryDocumentsTab from '../components/memory/MemoryDocumentsTab';import MemoryEngineTab from '../components/memory/MemoryEngineTab';import MemoryExplorerTab from '../components/memory/MemoryExplorerTab';import MemoryImportBanner from '../components/memory/MemoryImportBanner';import MemoryLearningsTab from '../components/memory/MemoryLearningsTab';import MemoryOffState from '../components/memory/MemoryOffState';+import MemorySettingsTab from '../components/memory/MemorySettingsTab';import SettingsTabbedPage from '../components/settings/layout/SettingsTabbedPage';import { Alert, AlertDescription, Button } from '../components/ui';import { CenteredLoadingState } from '../components/ui/LoadingState';@@ -118,11 +120,15 @@ export default function Memory() {title: t('memoryPage.tabs.conversations'),description: t('memoryPage.header.conversations'),},- documents: {- title: t('memoryPage.tabs.documents'),- description: t('memoryPage.header.documents'),+ brain: { title: t('memoryPage.tabs.brain'), description: t('memoryPage.header.brain') },+ background: {+ title: t('memoryPage.tabs.background'),+ description: t('memoryPage.header.background'),+ },+ settings: {+ title: t('memoryPage.tabs.settings'),+ description: t('memoryPage.header.settings'),},- context: { title: t('memoryPage.tabs.context'), description: t('memoryPage.header.context') },};const activeLabel =@@ -147,10 +153,12 @@ export default function Memory() {return <MemoryLearningsTab />;case 'conversations':return <MemoryConversationsTab />;- case 'documents':- return <MemoryDocumentsTab />;- case 'context':- return <MemoryContextTab />;+ case 'brain':+ return <MemoryBrainTab />;+ case 'background':+ return <MemoryBackgroundTab />;+ case 'settings':+ return <MemorySettingsTab />;default:return null;}@@ -167,8 +175,9 @@ export default function Memory() {{ id: 'explorer', label: t('memoryPage.tabs.explorer') },{ id: 'learnings', label: t('memoryPage.tabs.learnings') },{ id: 'conversations', label: t('memoryPage.tabs.conversations') },- { id: 'documents', label: t('memoryPage.tabs.documents') },- { id: 'context', label: t('memoryPage.tabs.context') },+ { id: 'brain', label: t('memoryPage.tabs.brain') },+ { id: 'background', label: t('memoryPage.tabs.background') },+ { id: 'settings', label: t('memoryPage.tabs.settings') },]}value={chip ?? undefined}onChange={next => setChip(next)}diff --git a/app/src/pages/__tests__/Memory.test.tsx b/app/src/pages/__tests__/Memory.test.tsxindex f31e329ccd..01e1e630c7 100644--- a/app/src/pages/__tests__/Memory.test.tsx+++ b/app/src/pages/__tests__/Memory.test.tsx@@ -32,11 +32,14 @@ vi.mock('../../components/memory/MemoryLearningsTab', () => ({vi.mock('../../components/memory/MemoryConversationsTab', () => ({default: () => <div data-testid="stub-conversations" />,}));-vi.mock('../../components/memory/MemoryDocumentsTab', () => ({- default: () => <div data-testid="stub-documents" />,+vi.mock('../../components/memory/MemoryBrainTab', () => ({+ default: () => <div data-testid="stub-brain" />,}));-vi.mock('../../components/memory/MemoryContextTab', () => ({- default: () => <div data-testid="stub-context" />,+vi.mock('../../components/memory/MemoryBackgroundTab', () => ({+ default: () => <div data-testid="stub-background" />,+}));+vi.mock('../../components/memory/MemorySettingsTab', () => ({+ default: () => <div data-testid="stub-settings" />,}));vi.mock('../../components/memory/MemoryImportBanner', () => ({default: ({ engineLabel }: { engineLabel: string }) => (@@ -84,7 +87,7 @@ beforeEach(() => {});describe('Memory page', () => {- it('renders the seven chips', async () => {+ it('renders the eight chips', async () => {renderAt('?tab=brain');for (const chip of ['engine',@@ -92,8 +95,9 @@ describe('Memory page', () => {'explorer','learnings','conversations',- 'documents',- 'context',+ 'brain',+ 'background',+ 'settings',]) {expect(await screen.findByTestId(`brain-tab-${chip}`)).toBeInTheDocument();}@@ -116,8 +120,9 @@ describe('Memory page', () => {['explorer', 'stub-explorer'],['learnings', 'stub-learnings'],['conversations', 'stub-conversations'],- ['documents', 'stub-documents'],- ['context', 'stub-context'],+ ['brain', 'stub-brain'],+ ['background', 'stub-background'],+ ['settings', 'stub-settings'],['engine', 'stub-engine'],])('opens the %s chip from ?brain=', async (chip, testId) => {renderAt(`?tab=brain&brain=${chip}`);@@ -127,9 +132,11 @@ describe('Memory page', () => {it.each([['graph', 'ask', 'stub-ask'],['goals', 'ask', 'stub-ask'],- ['sources', 'documents', 'stub-documents'],- ['sync', 'documents', 'stub-documents'],- ['history', 'documents', 'stub-documents'],+ ['sources', 'brain', 'stub-brain'],+ ['sync', 'brain', 'stub-brain'],+ ['history', 'brain', 'stub-brain'],+ ['documents', 'brain', 'stub-brain'],+ ['context', 'ask', 'stub-ask'],])('rewrites legacy ?brain=%s to %s', async (legacy, chip, testId) => {renderAt(`?tab=brain&brain=${legacy}&view=history`);expect(await screen.findByTestId(testId)).toBeInTheDocument();@@ -149,11 +156,11 @@ describe('Memory page', () => {it('shows the off state on non-engine chips and links to the Engine chip', async () => {hoisted.engineGet.mockResolvedValue(OFF);- renderAt('?tab=brain&brain=documents');+ renderAt('?tab=brain&brain=brain');expect(await screen.findByTestId('memory-off-state')).toHaveTextContent('Sign in or add a CortexDB key');- expect(screen.queryByTestId('stub-documents')).not.toBeInTheDocument();+ expect(screen.queryByTestId('stub-brain')).not.toBeInTheDocument();fireEvent.click(screen.getByTestId('memory-off-open-engine'));expect(await screen.findByTestId('stub-engine')).toBeInTheDocument();expect(screen.getByTestId('where')).toHaveTextContent('brain=engine');