Skip to content

feat(audit-log): icons for actions, actors, surfaces and outcomes - #2433

Merged
Makisuo merged 27 commits into
mainfrom
audit-log-ui/d-icons
Nov 10, 2026
Merged

Makisuo merged 27 commits into
mainfrom
audit-log-ui/d-icons

Conversation

@Makisuo

@Makisuo Makisuo commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

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.

  • Rows lead the action with a glyph for its verb: created, updated, deleted, rolled, revoked, read, tool call, SQL, API request, and so on. On a refused entry the glyph is red, next to the red edge.
  • Actor, source and outcome badges have glyphs (API key, agent, system; dashboard, API, MCP, chat; allowed, denied).
  • Filters: the kind switch, actor type and outcome options, and the person, resource, action and affected-user selects each lead with a glyph, so a select still says what it filters once a value replaces its label.
  • Entry detail: glyphs on the Origin, Changes and Details headings, the surface, the "Filter" pivots and "Link to entry".
  • Day headings have a calendar glyph.

Kit: eyebrow and attributeFilterAction take an icon option. Nothing changes for callers that pass none.

The verb table in audit-log/icons.ts is checked against AuditResources, 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:

  • The resource column shares the row's spare width with the action instead of holding a fixed 14rem. The action label used to collapse to about 70px where that column appears; it now keeps about half the spare width.
  • The lookup field takes the space the filters leave and drops to its own row only when that is too little to type in.
  • The source column appears one step later, so the action keeps its room at mid widths.

Before / after

Before (#2424) After

Close up:

Phone, before Phone, after Narrow desktop, after

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 are aria-hidden.
  • apps/web typechecks; oxlint with the CI config is clean; ui:patterns:check and ui:index:check OK; the ui-kit baseline is unchanged (724).
  • Checked in the lab (/lab/audit-log) at 390, 560, 900, 1090, 1200 and 1280px, in the Changes, Data access, All, filtered, expanded and unknown-lookup states.
  • Not run: a preview deploy. The change is view-only and the lab covers every state.

Stack: #2422 → #2423 → #2424 → this

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • New Features
    • Audit log filters and entries now display icons for actors, actions, sources, and outcomes, making activity easier to scan.
    • Audit log details include icons alongside key headings, source labels, outcomes, and entry links.
    • Attribute actions and eyebrow labels can now display optional icons.

…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.
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The audit-log views now use typed icon mappings in filters, list entries, and detail fields. Shared attribute-filter actions and eyebrow components also support optional icons.

Changes: Audit-log presentation

Layer / File(s) Summary
Audit icon mappings
apps/web/src/page/settings/audit-log/icons.ts
Typed mappings cover actor types, sources, outcomes, and declared action verbs. Unknown action verbs use a fallback icon.
Audit list filters and entries
apps/web/src/page/settings/audit-log/view.ts
Filters, badges, action rows, and day headings display icons. The view also adjusts responsive columns and the filter-and-lookup layout.
Audit entry details
apps/web/src/page/settings/audit-log/view-detail.ts
The detail view uses shared actor and denied badges and adds icons to fields, links, and section headings.

Shared UI icon options

Layer / File(s) Summary
Optional icons in shared UI components
packages/views/src/ui/attributes/attribute-row.ts, packages/views/src/ui/eyebrow.ts
attributeFilterAction and eyebrow accept optional icons and render them before their labels.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Possibly related PRs

  • MapleTechLabs/maple#1930: Adds status-page audit actions that receive icons from the verb mapping in this pull request.
  • MapleTechLabs/maple#2290: Adds alert-silence audit actions that receive icons from the verb mapping in this pull request.

Suggested labels: preview:web

Suggested reviewers: jeremyfunk

Merge Risk: Minimal · up to d28ae

The reviewed audit-log icon changes have no identified merge-blocking issue. The checked controls retain their accessible names.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: adding icons across audit-log actions, actors, sources, and outcomes.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 5 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7057b557-4567-401a-bc3d-fd6a85bd409f
Commits

Reviewing files that changed from the base of the PR and between 85486ef and d28aeb9.

Files selected for processing: 5

  • apps/web/src/page/settings/audit-log/icons.ts
  • apps/web/src/page/settings/audit-log/view-detail.ts
  • apps/web/src/page/settings/audit-log/view.ts
  • packages/views/src/ui/attributes/attribute-row.ts
  • packages/views/src/ui/eyebrow.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

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.
@maple-review-bot

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.
Base automatically changed from audit-log-ui/c-rows-layout to main November 10, 2026 10:50
@maple-review-bot

maple-review-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

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 pr_changed_files' five files were the review.
no findings · tests not needed · risk low

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.

  • auditActionIcon picks a glyph from the action's verb, a bolt for an unknown one
  • eyebrow and attributeFilterAction gained an optional icon
  • The resource column shares the row's spare width with the action
  • The source column moves from @xl to @2xl, the lookup field takes leftover space

d28aeb9 · What was checked, coverage and telemetry details are on the Maple / review check. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@Makisuo
Makisuo merged commit 130c677 into main Nov 10, 2026
29 checks passed
@Makisuo
Makisuo deleted the audit-log-ui/d-icons branch November 10, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant