From 8ff2862e05d0db19bfa9e2f8b038d007557669d3 Mon Sep 17 00:00:00 2001 From: nijuse Date: Fri, 3 Jul 2026 10:24:02 +0900 Subject: [PATCH] fix: type activity timeline items instead of any (#566) Co-authored-by: Cursor --- .../src/components/tabs/activity-tab.tsx | 47 ++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/dashboard/src/components/tabs/activity-tab.tsx b/dashboard/src/components/tabs/activity-tab.tsx index 0176aac..3648d0b 100644 --- a/dashboard/src/components/tabs/activity-tab.tsx +++ b/dashboard/src/components/tabs/activity-tab.tsx @@ -51,7 +51,9 @@ export function ActivityTab({ // useMemo ensures the merge only reruns when transactions or audit events change, // not on unrelated parent state changes (agentLog, loading flags, etc.). const mergedTimeline = useMemo(() => { - type TimelineItem = { ts: number; kind: "tx" | "audit"; id: string; data: any }; + type TimelineItem = + | { ts: number; kind: "tx"; id: string; data: Transaction } + | { ts: number; kind: "audit"; id: string; data: AuditLogEvent }; const txItems: TimelineItem[] = allTransactions.map((tx) => ({ kind: "tx", ts: new Date(tx.timestamp).getTime(), @@ -69,7 +71,8 @@ export function ActivityTab({ // inputs are already ordered. auditItems.sort((a, b) => b.ts - a.ts); const merged: TimelineItem[] = []; - let ti = 0, ai = 0; + let ti = 0, + ai = 0; while (ti < txItems.length && ai < auditItems.length) { if (txItems[ti].ts >= auditItems[ai].ts) merged.push(txItems[ti++]); else merged.push(auditItems[ai++]); @@ -103,7 +106,9 @@ export function ActivityTab({ }} />
-

Transaction Log

+

+ Transaction Log +

{allTransactions.length > 0 && (