[Security Solution] Add MVP UI for rule changes history#269617
Open
maximpn wants to merge 11 commits into
Open
[Security Solution] Add MVP UI for rule changes history#269617maximpn wants to merge 11 commits into
maximpn wants to merge 11 commits into
Conversation
6e05c19 to
5854035
Compare
07e26b0 to
b6b21d0
Compare
|
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
8 tasks
maximpn
added a commit
that referenced
this pull request
May 29, 2026
…271908) **Epic:** elastic/security-team#12367 (internal) **Follow-up to: #267350 **Related to: #269617 ## Summary Fixed rule change tracking instrumentation for RulesClient snooze and unsnooze methods. ## Details `snoozeRule` and `unsnoozeRule` in `RulesClient` perform an OCC (optimistic concurrency control) update that only modifies snooze-related attributes. The saved object returned by that update contains only the updated partial attributes, not the complete rule document. Passing that partial object to `logRuleChanges` caused the change history record to be missing required rule fields, breaking change tracking for snooze and unsnooze actions. The fix merges the original pre-update `attributes` with `updatedRuleRaw.attributes` so that `logRuleChanges` always receives a complete rule document. Issues were discovered during e2e testing of the UI in #269617. - `snooze_rule.ts`: Merge original `attributes` with `updatedRuleRaw.attributes` before passing the saved object to `logRuleChanges`. - `unsnooze_rule.ts`: Same fix. - `snooze_rule.test.ts`, `unsnooze_rule.test.ts`: Add test cases that verify `logRuleChanges` is called with the fully merged attributes.
1ae5329 to
dc53c21
Compare
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
cc @maximpn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #262697
Figma Design (internal)
Summary
Adds the MVP UI for the Rule Changes History feature. When the
ruleChangesHistoryEnabledexperimental feature flag is enabled, a new Changes history tab appears on the rule details page. The tab shows a timeline of recorded rule changes, and each entry can be expanded in a flyout with an Overview tab (summary of what changed) and a Change details tab (field-level diff).Details
API / data layer
fetchRuleChangesHistorycall torule_management/api/api.tsuseChangeHistoryReact hook for paginated history fetching/rules/id/:ruleId/historyroute inrules/routes.tsxRuleChangeHistoryItemtype tologic/types.tsUI components
ChangeHistoryTable— timeline list of rule changes withChangeHistoryTimelineItemrows andChangedFieldsBadgesChangeHistoryFlyout— detail flyout with header, actions, Overview and Change details tabs;describeActionandextractChangedFieldNamesutilitiesScreenshots
How to test
ruleChangesHistoryEnabledfeature flag inkibana.dev.yml: