From 650091b57ae4ee722e3f2e279bbcd0e84ca235bb Mon Sep 17 00:00:00 2001 From: jialin Date: Thu, 9 Jul 2026 18:19:23 +0800 Subject: [PATCH] fix(usage): carry deleted flag in summary-tab user filter union --- src/pages/usage/summary-tab/index.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/pages/usage/summary-tab/index.tsx b/src/pages/usage/summary-tab/index.tsx index 71a01d84..535b194d 100644 --- a/src/pages/usage/summary-tab/index.tsx +++ b/src/pages/usage/summary-tab/index.tsx @@ -256,13 +256,20 @@ const SummaryTab: React.FC = () => { ); (tokenMeta?.users || []).forEach((u) => { const id = u.identity.current?.user_id; - if (id != null && !map.has(id)) { - map.set(id, { - value: id, - label: u.label, - isCurrent: currentUserId != null && id === currentUserId - }); + if (id == null) return; + const existing = map.get(id); + if (existing) { + // A user in both sources is deleted if either marks it so, so the + // dropdown still shows the DeletedTag. + if (u.deleted) existing.deleted = true; + return; } + map.set(id, { + value: id, + label: u.label, + deleted: u.deleted, + isCurrent: currentUserId != null && id === currentUserId + }); }); // Sort the signed-in user first, tagged "[Current Account]" (matches the // Tokens tab), regardless of which source it came from.