Sort sessions by last activity

This commit is contained in:
Mohamed Boudra
2026-06-03 22:00:52 +07:00
parent bd4889e243
commit c44ad7ecd1
+1 -1
View File
@@ -44,7 +44,7 @@ function SessionsScreenContent({ serverId }: { serverId: string }) {
}, [isRevalidating, isManualRefresh]);
const sortedAgents = useMemo(() => {
return [...agents].sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
return [...agents].sort((a, b) => b.lastActivityAt.getTime() - a.lastActivityAt.getTime());
}, [agents]);
const handleBack = useCallback(() => {