2cb0b99314b175081d417ce965aeef3678b59e2b
Audit-log rows with user-FK diffs (assignedTo, ownerId, reassignedTo, createdBy, addedBy, changedBy, transferredBy) previously rendered the raw user UUID in the activity feed (e.g. "→ mEcsLxo5kyFMyhbOSehxJjY…"). Same gap on the row's actor — the rep had no idea who did what. - getRecentActivity collects all userIds referenced by either the row's actor (auditLogs.userId) or by user-FK diff values, then bulk-fetches user_profiles in a single query. Output rows now carry an `actorName` field and have their `oldValue`/`newValue` swapped for display names on user-FK fields. - Unknown / deleted users fall back to "Unknown user (#short-uuid)" so the audit trail stays useful for forensics. - ActivityItem client type extended with `actorName`. Existing consumers still read the raw `userId` for forensics + deep-link. tsc clean. 1419/1419 vitest pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
No description provided
Languages
TypeScript
98.7%
HTML
1%
CSS
0.1%
Shell
0.1%