Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(routing): cover brain redirect and settings route elements

Steven Enamakel63c95fde3229
diff --git a/app/src/components/routing/BrainRedirect.test.tsx b/app/src/components/routing/BrainRedirect.test.tsx
index 3635d7eaf0..320acb9ec0 100644
--- a/app/src/components/routing/BrainRedirect.test.tsx
+++ b/app/src/components/routing/BrainRedirect.test.tsx
@@ -28,9 +28,9 @@ describe('BrainRedirect', () => {
expect(renderAt('/brain')).toBe('/connections?tab=brain');
});
- it('maps the v1 graph and goals sub-tabs to the ask chip', () => {
- expect(renderAt('/brain?tab=graph')).toBe('/connections?tab=brain&brain=ask');
- expect(renderAt('/brain?tab=goals')).toBe('/connections?tab=brain&brain=ask');
+ it('maps the v1 graph and goals sub-tabs to the conversations chip', () => {
+ expect(renderAt('/brain?tab=graph')).toBe('/connections?tab=brain&brain=conversations');
+ expect(renderAt('/brain?tab=goals')).toBe('/connections?tab=brain&brain=conversations');
});
it('maps the v1 sources and sync sub-tabs to the brain chip', () => {
@@ -39,11 +39,18 @@ describe('BrainRedirect', () => {
});
it('passes a current chip through unchanged', () => {
- expect(renderAt('/brain?tab=background')).toBe('/connections?tab=brain&brain=background');
+ expect(renderAt('/brain?tab=conversations')).toBe('/connections?tab=brain&brain=conversations');
+ });
+
+ it('maps every retired v2 chip to a kept one', () => {
+ for (const retired of ['ask', 'explorer', 'learnings', 'background', 'settings']) {
+ expect(renderAt(`/brain?tab=${retired}`)).toBe('/connections?tab=brain&brain=conversations');
+ }
+ expect(renderAt('/brain?tab=migration')).toBe('/connections?tab=brain&brain=brain');
});
it('maps the retired context and documents chips', () => {
- expect(renderAt('/brain?tab=context')).toBe('/connections?tab=brain&brain=ask');
+ expect(renderAt('/brain?tab=context')).toBe('/connections?tab=brain&brain=conversations');
expect(renderAt('/brain?tab=documents')).toBe('/connections?tab=brain&brain=brain');
});
diff --git a/app/src/components/settings/settingsRouteElements.test.tsx b/app/src/components/settings/settingsRouteElements.test.tsx
index 64ae2522e4..9f0783c177 100644
--- a/app/src/components/settings/settingsRouteElements.test.tsx
+++ b/app/src/components/settings/settingsRouteElements.test.tsx
@@ -81,8 +81,8 @@ describe.each([
['/settings/memory-engine', '#/connections?tab=brain&brain=engine'],
['/settings/memory-data', '#/connections?tab=brain&brain=brain'],
['/settings/memory-sync', '#/connections?tab=brain&brain=brain'],
- ['/settings/memory-debug', '#/connections?tab=brain&brain=ask'],
- ['/settings/tasks', '#/connections?tab=brain&brain=ask'],
+ ['/settings/memory-debug', '#/connections?tab=brain&brain=conversations'],
+ ['/settings/tasks', '#/connections?tab=brain&brain=conversations'],
])('retired memory settings route %s', (route, target) => {
it(`redirects to ${target}`, async () => {
window.location.hash = `#${route}`;