Agents
{rows.length > 0 && Cumulative usage from the latest reports received today, per packet and fork. These snapshots do not measure tokens consumed today.
}
{live.length > 0 && table(live)}
{idle.length > 0 && <>
{expanded && {table(idle, "agents-heading idle-agents-toggle")}
}
>}
{!rows.length && }
;
}
/** Reduced FH-078 card: caller identity and public /state only, never inferred next actions. */
export function ResumeCard({ state, activity, agent }: { state: ProjectState; activity: Activity[]; agent?: string }) {
const now = useNow();
if (!agent) return null;
const row = agentStatusRows(state, activity, now).find((entry) => entry.agent.name === agent);
if (!row) return null;
// The card names one assignment and fork; never borrow another fork's last push.
const lastPush = row.status ? packetPushes(activity, row.status.claim.repoName, state.project.defaultBranch,
timestamp(row.status.claim.createdAt) ?? 0, now).toSorted((a, b) =>
(timestamp(b.recordedAt) ?? 0) - (timestamp(a.recordedAt) ?? 0) || b.sequence - a.sequence)[0] : undefined;
const packet = state.packets.find((entry) => entry.id === row.status?.claim.packet);
const missingPush = (timestamp(row.status?.claim.createdAt) ?? -Infinity) > oldestLoadedActivity(activity)
? "No push yet" as const : "Not in loaded activity" as const;
return