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
feat(memory): add memory page with tests
Steven Enamakel9aeacad6d5ae
diff --git a/app/src/pages/Memory.tsx b/app/src/pages/Memory.tsxindex 6dd315f675..8222dae68e 100644--- a/app/src/pages/Memory.tsx+++ b/app/src/pages/Memory.tsx@@ -85,7 +85,8 @@ export default function Memory() {const rawChip = params.get('brain');const requested = resolveMemoryChip(rawChip);const on = isMemoryOn(engine);- const chip: MemoryChip | null = requested ?? (engine ? (on ? 'ask' : 'engine') : null);+ // Without an explicit `?brain=`, the page always opens on the Provider chip.+ const chip: MemoryChip | null = requested ?? (engine ? 'engine' : null);const setChip = useCallback((next: MemoryChip, replace = false) => {diff --git a/app/src/pages/__tests__/Memory.test.tsx b/app/src/pages/__tests__/Memory.test.tsxindex 01e1e630c7..54ebd9287b 100644--- a/app/src/pages/__tests__/Memory.test.tsx+++ b/app/src/pages/__tests__/Memory.test.tsx@@ -103,9 +103,10 @@ describe('Memory page', () => {}});- it('defaults to Ask when an engine is active', async () => {+ it('defaults to Engine when an engine is active', async () => {renderAt('?tab=brain');- expect(await screen.findByTestId('stub-ask')).toHaveTextContent('hybrid');+ expect(await screen.findByTestId('stub-engine')).toBeInTheDocument();+ expect(screen.queryByTestId('stub-ask')).not.toBeInTheDocument();expect(screen.getByTestId('stub-import')).toHaveTextContent('TinyHumans');});diff --git a/app/test/playwright/specs/memory-v2.spec.ts b/app/test/playwright/specs/memory-v2.spec.tsindex 28bc790d33..432a10b062 100644--- a/app/test/playwright/specs/memory-v2.spec.ts+++ b/app/test/playwright/specs/memory-v2.spec.ts@@ -428,22 +428,18 @@ async function openMemory(page: Page, query = '') {const hash = (page: Page) => page.evaluate(() => window.location.hash);test.describe('Memory v2 — engine active', () => {- test('lands on Ask and drives engine, ask, pack preview, learnings, brain and background', async ({+ test('lands on Provider and drives engine, ask, pack preview, learnings, brain and background', async ({page,}) => {const fake = await installMemoryFake(page, { engineOn: true });await bootAuthenticatedPage(page, 'pw-memory-v2-active');await openMemory(page);- // 1. An active engine and no `?brain=` → the Ask chip.- await expect(page.getByTestId('brain-tab-ask')).toHaveAttribute('aria-selected', 'true', {+ // 1. No `?brain=` → the Provider chip, even with an active engine:+ // one CortexDB card, connected via TinyHumans.+ await expect(page.getByTestId('brain-tab-engine')).toHaveAttribute('aria-selected', 'true', {timeout: 20_000,});- await expect(page.getByTestId('memory-ask-tab')).toBeVisible();-- // Provider chip: one CortexDB card, connected via TinyHumans.- await page.getByTestId('brain-tab-engine').click();- await expect.poll(() => hash(page)).toContain('brain=engine');await expect(page.getByTestId('memory-engines')).toBeVisible();await expect(page.getByTestId('memory-engine-builtin')).toBeVisible();await expect(page.getByTestId('memory-engine-apikey')).toBeVisible();