diff --git a/site/src/pages/WorkspacePage/AppStatuses.tsx b/site/src/pages/WorkspacePage/AppStatuses.tsx index 48ae63813e..7c415ac241 100644 --- a/site/src/pages/WorkspacePage/AppStatuses.tsx +++ b/site/src/pages/WorkspacePage/AppStatuses.tsx @@ -47,16 +47,12 @@ export const AppStatuses: FC = ({ referenceDate, }) => { const [displayStatuses, setDisplayStatuses] = useState(false); + // Statuses are returned from the API sorted by created_at DESC, id DESC. const allStatuses: StatusWithAppInfo[] = agent.apps.flatMap((app) => - app.statuses - .map((status) => ({ - ...status, - app, - })) - .sort( - (a, b) => - new Date(b.created_at).getTime() - new Date(a.created_at).getTime(), - ), + app.statuses.map((status) => ({ + ...status, + app, + })), ); if (allStatuses.length === 0) {