AuditLogViewer with filtering, sorting, and export - #21
Open
gadyrcdz wants to merge 1 commit into
Open
Conversation
- Add AuditLogViewer, AuditLogTable, DateRangeFilter, EventTypeFilter, EventDetailModal, StateComparison, and ExportButton components - Implement client-side pagination and sorting via @tanstack/react-table - Support JSON/CSV export respecting active filters - Add responsive mobile card view for the audit log table - Add AuditEvent type and mock data for development pending API integration
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.
Overview
Implements the Audit Log Viewer UI described in the issue — a comprehensive interface for tracking portfolio events, changes, and actions with filtering, sorting, and export capabilities.
##closes #8
Changes
AuditLogViewer— main container managing filter state (date range, event types, search) and rendering the table + modalAuditLogTable— table built with@tanstack/react-table, includes client-side sorting and pagination (10 items/page); switches to a card-based layout on mobile (<md)DateRangeFilter— native date inputs for from/to filteringEventTypeFilter— multi-select dropdown with checkboxes, closes on outside clickEventDetailModal— shows full event details on row/card click; closes on Escape, backdrop click, or the close buttonStateComparison— before/after diff view, used inside the modal for events with state changes (e.g.settings_changed)ExportButton— exports the currently filtered event set as JSON or CSVAuditEventtype added tosrc/types/, following the existing pattern (Asset,RiskScore, etc.) and re-exported fromindex.tsexamples/mockAuditEvents.ts) with 1200 events for development and to validate rendering performance@tanstack/react-table(added topackage.json)Acceptance Criteria
Notes for reviewers
mockAuditEvents— there's aTODOmarking where this should be swapped for a real API call once the audit events endpoint exists (seeAuditLogViewer.tsx).AuditLogTable,AuditLogViewer, and the CSV export logic if desired — let me know.Screenshots
Mobile

Desktop
