Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: sort memories by latest first in settings UI

Louis Beaumont45621b571e1a
diff --git a/apps/screenpipe-app-tauri/components/settings/memories-section.tsx b/apps/screenpipe-app-tauri/components/settings/memories-section.tsx
index 3e50b4f5b..ef7deda9e 100644
--- a/apps/screenpipe-app-tauri/components/settings/memories-section.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/memories-section.tsx
@@ -71,7 +71,10 @@ export function MemoriesSection() {
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data: MemoryListResponse = await res.json();
apiCache.set(cacheKey, data, 60_000); // 1 min TTL
- setMemories(data.data);
+ const sorted = data.data.sort(
+ (a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()
+ );
+ setMemories(sorted);
setTotal(data.pagination.total);
} catch (err) {
if (!cached) {