Repository navigation
feat(audit-log): icons for actions, actors, surfaces and outcomes - #2433
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.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
This comment has been minimized.
This comment has been minimized.
…filters # Conflicts: # apps/web/src/route/search.ts
This comment has been minimized.
This comment has been minimized.
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. Presentational change confined to the audit-log view and two optional kit props; the kickoff's "changed since" list named unrelated files, so Adds glyphs across the audit log — row actions, actor/source/outcome badges, filters, entry detail and day headings — from a verb table the types keep exhaustive, and rebalances the row columns to make room. View-only; safe to merge.
|
Follow-up to the audit log UI polish. Stacked on #2424.
The log was all text: every row, badge and filter had to be read to be told apart. Now each kind of thing has a glyph, and a filter carries the same glyph as the badges it filters by.
Kit:
eyebrowandattributeFilterActiontake aniconoption. Nothing changes for callers that pass none.The verb table in
audit-log/icons.tsis checked againstAuditResources, so a new verb fails the build until it has a glyph. An action this build does not know gets the bolt.Layout, because the glyphs take width:
Before / after
Close up:
Verification
audit-log.scene.test.ts(20) and the attributes panel scene tests (6) pass: every accessible name the tests and screen readers use is unchanged, the glyphs arearia-hidden.apps/webtypechecks; oxlint with the CI config is clean;ui:patterns:checkandui:index:checkOK; the ui-kit baseline is unchanged (724)./lab/audit-log) at 390, 560, 900, 1090, 1200 and 1280px, in the Changes, Data access, All, filtered, expanded and unknown-lookup states.Stack: #2422 → #2423 → #2424 → this
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit