Skip to content

fix(audit-log): filter event audit logs by every SummitEvent subclass - #1088

Open
smarcet wants to merge 1 commit into
masterfrom
fix/audit-log-event-class-filters
Open

smarcet wants to merge 1 commit into
masterfrom
fix/audit-log-event-class-filters

Conversation

@smarcet

@smarcet smarcet commented Sep 25, 2026 •

Copy link
Copy Markdown

Summary

The Show Admin audit views hide most event history because the entity filter they send no longer matches what summit-api writes.

summit-api emits audit.entity as the concrete subclass name (class_basename($entity) in AuditLogOtlpStrategy), and audit-logs-api main now applies class_name as an exact term on audit.entity.keyword. With that in place:

  • class_name==SummitEvent (global audit log page and event form panel) only matches plain events. For Summit 73 in production it returns 813 rows and drops the 10000+ Presentation rows, plus every SummitEventWithFile and SummitGroupEvent record.
  • class_name==SummitEventAuditLog (post-save refresh in event-actions.js) is a legacy MySQL class name that matches nothing, so the panel goes blank right after saving an event.

This is the master port of the fix already shipped to production in 11b7ea8f and 39b9d02a.

Changes

  • src/pages/audit-log/audit-log-page.js, src/components/forms/event-form/index.js, src/actions/event-actions.js: send class_name==SummitEvent||Presentation||SummitEventWithFile||SummitGroupEvent, the same four subclasses summit-api normalizes in AuditLoggerFactory.
  • src/pages/audit-log/__tests__/audit-log-page.test.js: assert the new filter.

audit-logs-api already supports || on a single filter field (1238e56).

Verification

Against audit-logs-api.fnvirtual.app, Summit 73:

class_name filter total
SummitEvent (before) 813
SummitEvent||Presentation||SummitEventWithFile||SummitGroupEvent (after) 10000 (capped)
SummitEventAuditLog (old post-save refresh) 0
event 9643, before / after 0 / 38
event 8768 (SummitEventWithFile), before / after 0 / 17

Local: yarn jest src/pages/audit-log src/actions/__tests__/event-actions.test.js src/actions/__tests__/audit-log-actions.test.js src/components/forms/event-form/__tests__ src/reducers/audit_log passes. ESLint clean on the touched files.

Related

Summary by CodeRabbit

  • Bug Fixes
    • Audit logs now include changes to presentations, events with files, and group events, in addition to summit events. This provides a more complete view of activity associated with an event across the audit log and event details.

summit-api emits audit.entity as the concrete subclass name, so the
class_name==SummitEvent filter only matched plain events and hid every
Presentation, SummitEventWithFile and SummitGroupEvent record. The
post-save refresh in event-actions still sent the legacy
SummitEventAuditLog class name, which matches nothing on the
audit-logs-api and blanked the panel after saving an event.

The global audit log page, the event form audit panel and the post-save
refresh now send SummitEvent||Presentation||SummitEventWithFile||SummitGroupEvent.
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 3275cbcd-238e-467d-96b3-6e909045974d

📥 Commits

Reviewing files that changed from the base of the PR and between 64ca704 and 69659f8.

📒 Files selected for processing (4)
  • src/actions/event-actions.js
  • src/components/forms/event-form/index.js
  • src/pages/audit-log/__tests__/audit-log-page.test.js
  • src/pages/audit-log/audit-log-page.js

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

Event audit-log filters now match SummitEvent, Presentation, SummitEventWithFile, and SummitGroupEvent. The audit-log page test expects the expanded filter.

Changes

Event audit-log filters

Layer / File(s) Summary
Expand event audit-log class filters
src/actions/event-actions.js, src/components/forms/event-form/index.js, src/pages/audit-log/audit-log-page.js, src/pages/audit-log/__tests__/audit-log-page.test.js
The event action, event form, and audit-log page filters include four event-related class names. The event ID filter is unchanged, and the audit-log page test expects the expanded filter.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: santipalenque

Merge Risk: ⚪ Minimal · up to 69659

The event audit-log views now consistently request all four intended classes. No confirmed issue blocks merging.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: audit logs now filter by all concrete SummitEvent subclasses. It matches the updates to the audit log page, event form, and post-save refresh…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@smarcet smarcet self-assigned this Sep 25, 2026
@smarcet
smarcet requested review from romanetar and a lite review from Copilot September 28, 2026 17:49

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@romanetar romanetar 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.

LGTM

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.

3 participants