Repository navigation
feat(audit-log): day headings, a red edge on refusals, quieter reads - #2424
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.
|
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 9 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.
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.
🍁 Maple PR previewNote Preview resources were removed when this pull request closed. Final commit |
… 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
This comment has been minimized.
This comment has been minimized.
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.
|
F2 (duplicated access suffix list) fixed in aba17d0: |
|
Checked the head commit ( Two cosmetic leftovers from the move, neither blocking: 418: /** Label for an action string read off a row; null for one this build does not know. */
419: /**
420: * Actions that record access rather than a change: ...
424: export const AUDIT_ACCESS_ACTION_SUFFIXES = ...
430: export const auditActionLabel = (action: string): string | null =>The |
This comment has been minimized.
This comment has been minimized.
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.
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.
Maple review🟢 Confidence 10/10 · safe to merge. Contained UI change; the new heading and day-label behaviour is pinned by a scene test plus the moved DST and zone-midnight cases. Groups audit log rows under day headings, gives denied rows a red left edge, mutes allowed reads in the All view only, and shares
|
|
Preview test of https://app-pr-2424.maple.dev (headless browser, signed in as the shared reviewer, at 1440, 1024 and 390px). Passed: the list loads with no page errors, console errors or failed API calls; the Changes / Data access / All switch; date presets, person, resource type and action, actor type, outcome and lookup filters, each updating the URL and list; the filtered empty state and its clear action; day headings split at local midnight; entry detail with copy buttons and the actor, action and request filters; an entry link opening its entry in a fresh page, and a filter from there leaving the link's window; Reload and Load more (50 to 72 rows). Not exercised: the preview org holds only allowed telemetry reads, so denied rows, the Changes table, the resource filter and non-user actors were covered by the scene tests and the lab only. Found:
|
|
Follow-up: the Escape finding above is now fixed in #2453 as well. |
Part 3 of 3 of the audit log UI polish. Stacked on #2423.
The list was one long column of relative times. Now:
dayLabelanddayKeymove from the users detail intopage/kit/day-label, so both pages share them. The DST test moves with them, and a test for midnight in the viewer's zone is added.Not included: j/k keyboard navigation. It needs a document-wide key subscription on the settings page and could clash with the shell's shortcuts, so it's left for a follow-up. Rows can still be tabbed to and opened with Enter.
Before / after
Error state (unchanged, still renders):
Verification
audit-log.scene.test.ts: rows sit under Today and Yesterday headings (18 pass).day-label.test.ts: DST and zone-midnight cases. The users detail tests still pass (57 across both).apps/webtypechecks; oxlint is clean;ui:patterns:checkOK;ui:indexregenerated.Stack: #2422 → #2423 → #2424 (this)
🤖 Generated with Claude Code