Preserve policy state between action selections

What does this MR do and why?

This change adds a caching feature to a security policy editor interface. When users switch between different policy action types (like "auto-dismiss" and "auto-resolve"), the system now remembers and preserves the configuration they had previously set up for each type, instead of resetting everything to default values. This prevents users from losing their work when they switch back and forth between different policy options while configuring security rules.

The update also adds new text labels for "Detected" and "Not detected" rule types to improve the user interface clarity.

References

Screenshots or screen recordings

Description UI
Preserve state cache.mov

How to set up and validate locally

  1. Enable feature flag

    Feature.enable(:auto_dismiss_vulnerability_policies)
  2. Go to Secure -> Policies

  3. New vulnerability policy

  4. Add rules and switch action type

  5. Add more rules and criteria, switch between action type. Make sure state is not reset

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #577877 (closed)

Edited by Artur Fedorov

Merge request reports

Loading