Repository navigation
feat(audit-log): a consistency pass over the list, filters and entry detail - #2453
Conversation
…lookup filters The audit log listed every telemetry read and MCP tool call beside the changes, so the entries an admin opens the page for were buried. The list now opens on Changes (data access hidden unless it was denied), with Data access and All one click away, backed by a new kind param on GET /v2/audit_log. Also: resource type, action and affected user filters, a lookup field that turns a pasted id or action into its filter, chips for filters with no control of their own, a working Custom range, and a /lab/audit-log page over fixtures.
…ere it came from Following a trail meant copying an id and pasting it back as a filter. Every actor, action, resource, affected user and request in an entry's detail now has a Filter action that lists every entry with that value. Also: unnamed actors and membership changes show the member's name, a new Origin section shows surface, IP, country and request, metadata keys read as labels, and each entry has a link that opens the log on it (?entry=alog_...) and scrolls it into view. inlineCode gains size and tone options; the audit log detail and the alerts hub empty state move onto them, clearing 6 ui-kit baseline violations.
The list was one undifferentiated column of relative times. Rows now sit under Today / Yesterday / date headings counted in the viewer's zone, a denied entry carries a red left edge, and in the All view allowed reads, tool calls and SQL runs are muted so changes stand out. The Source column shows from a narrower width. dayLabel/dayKey move from the users detail into page/kit/day-label so both pages share them. The audit log list clears its last 3 ui-kit baseline violations.
In Data access every row is a read, so muting allowed ones dimmed the whole list. The tone now depends on the view as well as the entry.
… minute was The link listed the minute around the entry, newest first, so 50 newer entries pushed it to page 2 where it never opened. The window now ends at the entry, which therefore heads the first page, and a later page holding it reveals it too.
…layout # Conflicts: # apps/web/src/page/settings/audit-log/audit-log.scene.test.ts
The web muted reads with its own copy of the server's access suffixes, so a new access action would be filtered but not muted. The list and an isAuditAccessAction helper move to @maple/domain/audit-actions; the backend re-exports it for existing importers.
… and the outcome Each row leads its action with a glyph for the verb (created, updated, deleted, rolled, read, tool call, SQL, API request), and the filters carry the same glyphs as the badges they filter by. The eyebrow and the Filter action take an icon option.
…verb has a glyph The resource column shares the row's spare width with the action instead of holding a fixed 14rem, so the label no longer collapses where the column appears. The verb table is total, so a new verb fails the build until it has a glyph. One actor badge and one denied badge for the rows and the detail, and an eyebrow with an icon stays block-level on a heading.
…filters # Conflicts: # apps/web/src/route/search.ts
The Origin section was skipped when an entry had no IP, country or request id, which also hid the surface it always has. Adds a test for that, and one for the window an entry's link opens.
…detail Rows: every actor is a 16px marker and a name, so names line up; the source is quiet text instead of a box on each row. Filters read muted until set. Entry detail: copy and filter sit beside the value as one group, the outcome has its own row, and values start on their label's line.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 33 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This comment has been minimized.
This comment has been minimized.
A custom range no longer overflows its button, the actor mark is exactly an avatar wide, copy and filter keep apart on touch, and the kind description shortens instead of moving Reload. Adds view tests for the entry's filter buttons and the actor mark's name.
This comment has been minimized.
This comment has been minimized.
…e-minute window An entry link lists the minute ending at its entry. A pivot kept that custom range, so "every entry with this actor" listed only that minute.
… presets' width The popover's positioner keeps the width it measured for the presets, and an auto-width popup stayed inside it: two days of the week, the second month and Apply were cut off. Found on the preview. Also words the filtered empty state for any filter, not four of them.
Pressing "Custom range" replaced the pressed preset with the calendar and focus fell to the page, so Escape reached nothing. Focus now moves into the popover. Found on the preview.
This comment has been minimized.
This comment has been minimized.
Maple review🟢 Confidence 10/10 · safe to merge. View-only change on top of an already-reviewed head; every kit option it uses resolves, and the tone/baseline claims are the one part no test can pin. A consistency pass over the audit log page: one actor marker per row, quieter source and filters, and a rebuilt entry detail (actions beside values, its own Outcome row). Contained to views and the kit, and safe to merge.
|
A consistency pass over the audit log UI. Stacked on #2433.
After the icon pass the page had every piece, but the pieces did not agree with each other: actors were drawn two ways, each row carried a boxed source badge, the filters used three different text tones, and the entry detail wrapped its "Filter" chips onto lines of their own.
Rows
Filters
Entry detail
Found on the #2424 preview
The custom range calendar was clipped to the presets' 192px: Friday, Saturday, the second month and Apply were cut off. The popup now sizes to its content.
The filtered empty state named four filters ("this range, person, actor type and outcome") whichever one was set. It now says "Nothing recorded matches these filters."
Escape did not close the popover once it showed the calendar: pressing "Custom range…" replaced the pressed preset and focus fell to the page. Focus now moves into the popover, and Escape closes it and returns focus to the button (checked in the lab).
Kit:
copyButtontakes the existingicon-2xsbutton size.attributeFilterActionloses theiconoption #2433 added, since nothing uses it now.Before / after
Verification
audit-log.scene.test.ts(26) passes, with two new view tests: an open entry offers its three filter buttons by name, and a row names the kind of actor behind an API key.apps/webtypechecks; oxlint with the CI config is clean;ui:patterns:checkandui:index:checkOK; the ui-kit baseline is unchanged (723)./lab/audit-log) at 390, 640, 900, 1024, 1200 and 1280px, in the Changes, Data access, All, filtered, expanded and unknown-lookup states.Stack: #2422 → #2423 → #2424 → #2433 → this
🤖 Generated with Claude Code