Q159: the home page's recent runs are the newest ones

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-09 02:33:37 -04:00
1 parent 9d166e3fc9
commit 459dcf0ea2
3 files changed
+16 -1

No files matched your search

+2 -1
View File
@@ -1,3 +1,4 @@
import { newestRuns } from "./runs/newest-runs";
import { isBusinessTask } from "./work/task-helpers";
import { useMemo, useState, type CSSProperties } from "react";
import { Avatar, Button, Icon, Pill } from "../shared/ui";
@@ -222,7 +223,7 @@ function RunActivityCard({
agents: AgentRecord[];
onViewAll: () => void;
}) {
const recent = taskRuns.slice(0, 6);
const recent = newestRuns(taskRuns, 6);
return (
<section className="card">
<div className="row" style={{ marginBottom: 12 }}>
@@ -0,0 +1,4 @@
/** The newest `count` runs, newest first; the snapshot lists runs oldest first (time, then insertion). */
export function newestRuns<T>(runs: T[], count: number): T[] {
return runs.slice(-count).reverse();
}