Admin portal audit#80
Merged
victor-cuevas merged 2 commits intofeat/admin-portalfrom Apr 17, 2026
Merged
Conversation
b2b68b4 to
4b32ce1
Compare
521d88c to
a798741
Compare
a798741 to
d6cbef9
Compare
…anup Add audit logging to the admin portal: - Store layer: InsertAuditEntry, ListAuditEntries (paginated, filtered by user/action/instance/date range, FTS5 full-text search on detail), DeleteAuditEntriesBefore for retention cleanup - Migration v2: FTS5 virtual table with insert/delete/update triggers for automatic index sync - REST API: GET /api/audit with query params (user, action, instance_id, from, to, q, page, per_page) capped at 100 per page - Write-on-action: instance create/update/delete, login, logout, and password change all produce audit entries with contextual detail - Retention cleanup: background goroutine runs immediately on startup then daily, configurable via audit.retention_days (default 90, 0 to keep forever)
Filterable, paginated audit log table with debounced FTS5 search, action type dropdown, and date range pickers. Extracts logic into pure functions (utils/audit.js) and composable (useAuditLog.js). - Date filters use local-timezone boundaries, not UTC - Stale response guard discards out-of-order fetches - 25 utility + 11 composable tests (165 total passing)
d6cbef9 to
ab1bcc9
Compare
sergiopalacio
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.