Skip to content

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

chore: files changed app/src/components/memory/MemoryLearningsTab.test.tsx,app/src/components/memory

Steven Enamakel780c86b64129
diff --git a/app/src/components/memory/MemoryLearningsTab.test.tsx b/app/src/components/memory/MemoryLearningsTab.test.tsx
index 878b128394..bfe7f8ce60 100644
--- a/app/src/components/memory/MemoryLearningsTab.test.tsx
+++ b/app/src/components/memory/MemoryLearningsTab.test.tsx
@@ -1,4 +1,4 @@
-import { fireEvent, screen, waitFor } from '@testing-library/react';
+import { fireEvent, screen, waitFor, within } from '@testing-library/react';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { Hit } from '../../services/api/memoryApi';
@@ -36,6 +36,21 @@ describe('MemoryLearningsTab', () => {
});
});
+ it('badges learnings the belief builder derived', async () => {
+ hoisted.list.mockResolvedValue({
+ items: [
+ { ...learning('b1', 'Works best in the morning'), meta: { tags: ['belief'] } },
+ { ...learning('l1', 'Prefers dark mode'), meta: { tags: ['ui'] } },
+ ],
+ });
+ renderWithProviders(<MemoryLearningsTab />);
+ const belief = await screen.findByTestId('memory-learning-b1');
+ expect(within(belief).getByTestId('memory-hit-belief')).toHaveTextContent('Built belief');
+ expect(
+ within(screen.getByTestId('memory-learning-l1')).queryByTestId('memory-hit-belief')
+ ).not.toBeInTheDocument();
+ });
+
it('shows the empty state', async () => {
hoisted.list.mockResolvedValue({ items: [] });
renderWithProviders(<MemoryLearningsTab />);
diff --git a/app/src/components/memory/MemoryLearningsTab.tsx b/app/src/components/memory/MemoryLearningsTab.tsx
index 7a5509bc41..84dd6ec98c 100644
--- a/app/src/components/memory/MemoryLearningsTab.tsx
+++ b/app/src/components/memory/MemoryLearningsTab.tsx
@@ -1,7 +1,8 @@
/**
* Memory → Learnings: the explicit facts, preferences and procedures memory
* holds. Lists `memory_items_list` filtered to learnings (paged by cursor),
- * adds one with `memory_learn`, and deletes with `memory_forget`.
+ * adds one with `memory_learn`, and deletes with `memory_forget`. Beliefs the
+ * background builder distilled (tagged `belief`) carry a "Built belief" badge.
*
* debug logging: DEBUG=openhuman:memory:learnings
*/