Skip to content

feat(audit-log): filter from an entry's detail, name members, show where it came from - #2423

Merged
Makisuo merged 9 commits into
mainfrom
audit-log-ui/b-detail-pivots
Nov 10, 2026
Merged

Makisuo merged 9 commits into
mainfrom
audit-log-ui/b-detail-pivots

Conversation

@Makisuo

@Makisuo Makisuo commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Part 2 of 3 of the audit log UI polish. Stacked on #2422.

Following a trail through the audit log meant copying an ID and pasting it back as a filter. Now every actor, action, resource, affected user and request in an entry's detail has a Filter action that lists every entry with that value. Filtering by an actor clears the actor-type filter; filtering by an action also picks its resource type, so the action select shows it.

  • Unnamed actors and membership changes show the member's name from the org's memberships instead of a user_… ID.
  • New Origin section: surface, IP address, country (flag and name) and request ID.
  • Metadata keys read as labels ("Rows returned", "Chat user") instead of row_count, display_name.
  • Link to entry opens the log ending at that entry (with the minute before it as context), so the entry heads the first page however busy that minute was. It opens expanded and scrolled into view (?entry=alog_…), even if it arrives on a later page. Any filter change drops the link param.
  • 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.

Before / after

Before (main) After

Member names in the list ("Member · Linus Torvalds", Linus as actor):

Verification

  • audit-log.scene.test.ts: an unnamed actor is named from memberships, actor and action pivots produce the right URLs, a shared entry link expands its entry and issues the scroll, including when it arrives on a later page, the Origin section names the country (17 pass).
  • 175 tests across the audit log, settings components and alerts hub pass; apps/web and packages/views typecheck; oxlint is clean; lint:ui-baseline shrank 733 → 727.

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

🤖 Generated with Claude Code

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

This comment has been minimized.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

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: 91d91e8f-5025-474c-86c9-b45dab4d4d72
Commits

Reviewing files that changed from the base of the PR and between 50c77d3 and 7fbd842.

Files selected for processing: 10

  • apps/web/src/components/settings/audit-log-filters.ts
  • apps/web/src/lab/audit-log-fixture.ts
  • apps/web/src/page/alerts/hub/view-empty.ts
  • apps/web/src/page/settings/audit-log/audit-log.scene.test.ts
  • apps/web/src/page/settings/audit-log/model.ts
  • apps/web/src/page/settings/audit-log/update.ts
  • apps/web/src/page/settings/audit-log/view-detail.ts
  • apps/web/src/page/settings/audit-log/view.ts
  • packages/views/src/ui/inline-code.ts
  • scripts/oxlint-plugins/ui-kit-baseline.json
  • 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

@maple-review-bot maple-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 inline note from Maple's review. The score and summary are in the review comment above.

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

This comment has been minimized.

@Makisuo

Makisuo commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

F2 (no test for dropping ?entry=): added in the latest push, a filter change leaves a shared entry link behind in audit-log.scene.test.ts. Merged up into #2424.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@maple-review-bot maple-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 inline note from Maple's review. The score and summary are in the review comment above.

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.

Base automatically changed from audit-log-ui/a-views-filters to main November 10, 2026 09:45
@maple-review-bot

This comment has been minimized.

@maple-review-bot maple-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 inline note from Maple's review. The score and summary are in the review comment above.

…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-bot

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

Copy link
Copy Markdown

Maple review

🟢 Confidence 10/10 · safe to merge. Each new behavior (pivots, reveal, member names, origin) has a scene test, and the entry-link pivot fix is pinned by a URL assertion.
no findings · tests covered · risk medium

Adds Filter pivots from an entry's detail, member names for unnamed actors and membership changes, an Origin section, and a per-entry link that expands and scrolls to its entry; a filter change now also drops ?entry=. Safe to merge.

Fixed since the last review

  • ✅ F5 · Pivot from a shared entry link keeps that link's one-minute window

7fbd842 · 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 e1bb61a into main Nov 10, 2026
41 checks passed
@Makisuo
Makisuo deleted the audit-log-ui/b-detail-pivots branch November 10, 2026 10:20
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