diff --git a/artifacts/tx-os/public/opengraph.jpg b/artifacts/tx-os/public/opengraph.jpg index 917d6b40..335bec3c 100644 Binary files a/artifacts/tx-os/public/opengraph.jpg and b/artifacts/tx-os/public/opengraph.jpg differ diff --git a/artifacts/tx-os/src/pages/admin.tsx b/artifacts/tx-os/src/pages/admin.tsx index 0c40be95..bb316d25 100644 --- a/artifacts/tx-os/src/pages/admin.tsx +++ b/artifacts/tx-os/src/pages/admin.tsx @@ -6406,15 +6406,18 @@ function isForceDeleteEntry(entry: AuditLogEntry): boolean { return false; } -// Pulls a human-readable display name for a force-deleted entity from its -// audit metadata so the row can show "service #4821 · My Service" inline -// without admins having to expand the JSON. Returns null when the row is not -// a forced deletion or the metadata lacks any usable name field. -function forceDeletedEntityName( +// Pulls a human-readable display name for a deleted entity from its audit +// metadata so the row can show "service #4821 · My Service" or "user #1234 · +// Ahmed Al-Saleh" inline without admins having to expand the JSON. Applies +// to every force-delete row (where the dep counts are also useful) and to +// non-force `user.delete` rows so admins can recognise the deleted person +// by name even when the deletion was clean. Returns null when there is no +// usable name field in the metadata. +function deletedEntityName( entry: AuditLogEntry, lang: string, ): string | null { - if (!isForceDeleteEntry(entry)) return null; + if (!isForceDeleteEntry(entry) && entry.action !== "user.delete") return null; const meta = asRecord(entry.metadata); const en = asString(meta.nameEn) ?? @@ -6474,7 +6477,7 @@ function AuditLogRow({ const summary = formatAuditSummary(entry, t, lang); const isForced = isForceDeleteEntry(entry); const chips = isForced ? dependencyChips(entry, t) : []; - const deletedName = forceDeletedEntityName(entry, lang); + const deletedName = deletedEntityName(entry, lang); const showDeletedTarget = deletedName != null && entry.targetId != null; return (