From 8eaf7948f7d3ea3430841b25b19dbaaf2fd5ee9d Mon Sep 17 00:00:00 2001 From: thibaud-lclr Date: Mon, 20 Apr 2026 14:57:08 +0200 Subject: [PATCH] fix(dashboard): sort recent tickets by newest first --- src/components/projects/ProjectDashboard.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/projects/ProjectDashboard.tsx b/src/components/projects/ProjectDashboard.tsx index 49e2e87..76e50aa 100644 --- a/src/components/projects/ProjectDashboard.tsx +++ b/src/components/projects/ProjectDashboard.tsx @@ -391,7 +391,9 @@ export default function ProjectDashboard() { return
Loading...
; } - const recentTickets = tickets.slice(-10).reverse(); + const recentTickets = [...tickets] + .sort((a, b) => Date.parse(b.detected_at) - Date.parse(a.detected_at)) + .slice(0, 10); const activePollList = Object.entries(activePolls); const activeAgentList = Object.values(activeAgents); const done24h = throughput?.done_last_24h ?? 0;