Skip to content

Conversation

@speaker-ender
Copy link
Contributor

@speaker-ender speaker-ender commented Nov 7, 2025

Ticket ENG-1927

Description Of Changes

Persisting monitor field filters while filtering by a staged resource in the resource tree.

Code Changes

  • Removed useEffect hook used to reset the filters when the resource urn changed

Steps to Confirm

  1. Make sure the Helios V2 beta flag is set and there is an available resource monitor
  2. Go to the action center screen
  3. Click a datastore monitor in the results to get to a classifier screen
  4. Click the Filter button and change the default filters
  5. Click apply and confirm that the filters updated
  6. Choose different items from the tree selection on the left
  7. Confirm that the results update to include values from the selected tree item and that the filters do not reset to the default values

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

@vercel
Copy link

vercel bot commented Nov 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
fides-plus-nightly Ready Ready Preview Comment Nov 7, 2025 3:11pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
fides-privacy-center Ignored Ignored Nov 7, 2025 3:11pm

@speaker-ender speaker-ender force-pushed the refactor/persist-monitor-field-filters--ENG-1927 branch from 83ee694 to 0a5aa82 Compare November 7, 2025 15:06
@speaker-ender speaker-ender force-pushed the refactor/persist-monitor-field-filters--ENG-1927 branch from 0a5aa82 to ed6f8ca Compare November 7, 2025 15:07
@speaker-ender speaker-ender marked this pull request as ready for review November 7, 2025 15:07
@speaker-ender speaker-ender requested a review from a team as a code owner November 7, 2025 15:07
@speaker-ender speaker-ender requested review from jpople and removed request for a team November 7, 2025 15:07
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR removes an 8-line useEffect hook that automatically reset filter state whenever the stagedResourceUrn changed in the action center monitor field filters. Previously, selecting different resources from the tree would reset filters to their default values, creating a poor user experience. The change enables filters to persist across tree selections, allowing users to maintain their filter preferences while exploring different resources.

The implementation is clean and straightforward:

  • Removed lines 175-183 which contained the useEffect that called resetToInitialState() on stagedResourceUrn changes
  • Filter state is managed via URL query params using the useMonitorFieldsFilters hook
  • The stagedResourceUrn is still passed to the API query to fetch filtered data for the selected resource
  • All other filter functionality (apply, reset, clear) remains intact

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is extremely simple and low-risk: it removes 8 lines of code that were causing undesired behavior. The filter state management continues to work through URL query params, and the stagedResourceUrn is still properly passed to API calls to fetch the correct data. No new logic is introduced, only the auto-reset behavior is removed.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
CHANGELOG.md 5/5 Added changelog entry documenting the filter persistence behavior change
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/MonitorFieldFilters.tsx 5/5 Removed useEffect hook that reset filters when stagedResourceUrn changed, enabling filter persistence across tree selections

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@jpople jpople left a comment

Choose a reason for hiding this comment

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

Tested locally, confirmed working.

@speaker-ender speaker-ender added this pull request to the merge queue Nov 11, 2025
Merged via the queue into main with commit c1fc3c6 Nov 11, 2025
47 checks passed
@speaker-ender speaker-ender deleted the refactor/persist-monitor-field-filters--ENG-1927 branch November 11, 2025 21:43
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