fix(usage): carry deleted flag in summary-tab user filter union

This commit is contained in:
jialin
2026-07-09 20:36:52 +08:00
committed by jialin
parent 5bdfb36721
commit 650091b57a
+13 -6
View File
@@ -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.