From 3d284641d7babfece8d6460ed7351605f5545443 Mon Sep 17 00:00:00 2001 From: xarmian Date: Tue, 14 Apr 2026 07:05:49 -0400 Subject: [PATCH] feat: add audit log UI for admin console (#108) * feat: add audit log UI for admin console Replace placeholder with full audit log page: filterable by action type and date range, paginated table with relative timestamps, color-coded action badges, parsed metadata details, and IP addresses. * fix: show Unknown for missing actors, guard against stale filter responses Show "Unknown" instead of "System" for entries without actor info (e.g. failed logins). Add a request counter so rapid filter changes discard stale responses instead of overwriting newer results. --- .../console/admin/audit-log/+page.svelte | 459 +++++++++++++++++- 1 file changed, 444 insertions(+), 15 deletions(-) diff --git a/web/src/routes/console/admin/audit-log/+page.svelte b/web/src/routes/console/admin/audit-log/+page.svelte index df70e895..40fd55fd 100644 --- a/web/src/routes/console/admin/audit-log/+page.svelte +++ b/web/src/routes/console/admin/audit-log/+page.svelte @@ -1,21 +1,450 @@ -
-

📋

-

Audit Log

-

View authentication events, user actions, and administrative changes across the platform.

-

Coming soon

+ + +
+
+ + + +
+ + {#if loading} +
Loading audit log...
+ {:else if error} +
+

{error}

+ +
+ {:else if entries.length === 0} +
+

No audit log entries

+

No events match the selected filters.

+
+ {:else} +
+ + + + + + + + + + + + {#each entries as entry (entry.id)} + + + + + + + + {/each} + +
TimeUserActionDetailsIP Address
+ {relativeTime(entry.created_at)} + {displayUser(entry)} + + {formatAction(entry.action)} + + {formatMetadata(entry.metadata, entry.action)}{entry.ip_address || '\u2014'}
+
+ +
+ {#if hasMore} + + {:else} + No more entries + {/if} +
+ {/if}