diff --git a/frontend/src/components/history-view.tsx b/frontend/src/components/history-view.tsx index f74c00d..fa2441c 100644 --- a/frontend/src/components/history-view.tsx +++ b/frontend/src/components/history-view.tsx @@ -75,6 +75,11 @@ export function HistoryView() { groups[sid].logs.push(log) }) + // Sort logs within each group by timestamp (ascending) for display + Object.values(groups).forEach(group => { + group.logs.sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime()) + }) + // Convert to array and sort by timestamp const sortedGroups = Object.values(groups).sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()