Skip to content

feat(audit-log): add UI for Audit Log API#594

Merged
ayushjain17 merged 14 commits intomainfrom
audit-log-ui
Oct 14, 2025
Merged

feat(audit-log): add UI for Audit Log API#594
ayushjain17 merged 14 commits intomainfrom
audit-log-ui

Conversation

@knutties
Copy link
Copy Markdown
Collaborator

Problem

The Audit Log feature that lists all changes on the core tables of Superposition is not available for view in the UI. Teams using Superposition need it for easy review - particularly when they want to port the changes to other instances.

Solution

This PR adds a UI over the Audit Log API. It uses the same patterns for tables/filters as the existing pages (particularly the experiment list page).

Environment variable changes

N/A

Pre-deployment activity

N/A

Post-deployment activity

Things needed to be done after deploying this change (if any)

API changes

N/A

Possible Issues in the future

N/A

@Datron Datron force-pushed the main branch 4 times, most recently from 36cf78d to be77640 Compare July 21, 2025 13:57
@knutties knutties marked this pull request as ready for review September 13, 2025 09:04
@knutties knutties requested a review from a team as a code owner September 13, 2025 09:04
default_config::DefaultConfigUpdateRequest,
experiment_groups::ExpGroupMemberRequest,
experiments::{
ApplicableVariantsQuery, ApplicableVariantsRequest, AuditQueryFilters,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This file's change are removing the audit log that was present in the experimentation schema earlier.

@knutties knutties force-pushed the audit-log-ui branch 3 times, most recently from 89c6cd2 to 15b4d52 Compare September 17, 2025 16:36
ele_map
.insert(
"timestamp".to_string(),
Value::String(ele.timestamp.format("%v %T").to_string()),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can this be formatted to IST for now since all our customers are in India

Copy link
Copy Markdown
Collaborator

@ayushjain17 ayushjain17 Oct 6, 2025

Choose a reason for hiding this comment

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

We dont need to do this right now
We need to achieve that throughout the framework

Which can be done later

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It can be hardcoded for now, the UTC time is annoying to convert in my head

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lets not do it now, I have a solution which is more dynamic and robust based on user's Locale

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am not saying not to do it at all

@@ -0,0 +1,318 @@
use std::{fmt::Display, str::FromStr};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should be in the folder crates/frontend/src/components/audit_log_filters.rs

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Its fine
Its following as per other already existing ones

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Its a component right? Lets put it in the component folder. If others are in the wrong place, we can move those to it another PR. Seems weird otherwise

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Column::new(
"timestamp".to_string(),
false,
move |value: &str, _row: &Map<String, Value>| {
let timestamp = value.to_string();
view! { <span class="text-gray-900">{timestamp}</span> }.into_view()
},
ColumnSortable::No,
Expandable::Disabled,
default_column_formatter,
),

timestamp is still present as the key column. Is this okay?

@Datron Datron self-requested a review October 14, 2025 10:07
@ayushjain17 ayushjain17 added this pull request to the merge queue Oct 14, 2025
Merged via the queue into main with commit 1288eac Oct 14, 2025
12 checks passed
@ayushjain17 ayushjain17 deleted the audit-log-ui branch October 14, 2025 11:02
sauraww pushed a commit that referenced this pull request Nov 3, 2025
* feat: add audit log UI with filters

* feat: add audit log UI with filters

* feat: add audit log UI with filters

* feat: add audit log UI with filters

* feat: add audit log UI with filters

* feat: add audit log UI with filters

* feat: audit log ui filter button positioning

* feat: move mod.rs out to audit_log.rs

* feat: fix compilation errors after rebase

* feat: fix UI after rebase

* feat: remove audit_log from experiments

* feat: separate pagination_params like other pages

* feat: use strum for string variants of enum

* refactor: Code improvement

---------

Co-authored-by: ayush.jain@juspay.in <ayush.jain@juspay.in>
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.

4 participants