Skip to content

Conversation

@speaker-ender
Copy link
Contributor

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

Ticket ENG-1595

Description Of Changes

  • Adding ability to remove fields using the dropdown.
  • Makes field actions dynamic for list items and in the drawer

Code Changes

  • Updates action handler for confirm removal with actual request
  • Adding confirm removal to dropdown actions enum
  • Creates new enums for dynamic list item and drawer buttons based on state

Steps to Confirm

  1. Make sure that the Helios V2 beta flag is enabled in the settings
  2. Visit the action center and choose a datastore monitor
  3. Ignore a field
  4. Confirm that the list item now has a Restore button
  5. Confirm that the details drawer now contains Restore button
  6. Find a field in the Removed status
  7. Confirm that it has a Mute and Remove button on the list item as well as in the details tray
  8. Confirm that the Remove button handles the confirm-removal action

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 10, 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 17, 2025 4:54pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
fides-privacy-center Ignored Ignored Nov 17, 2025 4:54pm

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 11, 2025

Greptile Overview

Greptile Summary

This PR adds support for removing fields in the action center with proper confirmation workflows. The implementation makes field actions dynamic based on resource status using readonly mapping objects, following best practices.

Key Changes:

  • Added promoteRemovalStagedResources RTK Query mutation endpoint with proper cache invalidation
  • Converted static action arrays to readonly status-based mappings for both list items and drawer actions (following custom rule eb80ac35)
  • Added "Remove" action button to removal and removal_promotion_error statuses with TrashCan icon
  • Implemented confirmation dialog for removal action ("Are you sure you want to remove these X resources?")
  • Updated action labels: "Promote removals" → "Remove"

Issues Found:

  • Variable name typo: prmoteRemovalMutation missing 'o' in useFieldActions.tsx:60

Confidence Score: 4/5

  • This PR is safe to merge after fixing the typo - functionality is straightforward with proper error handling
  • Score reflects a simple typo that needs correction before merging. The implementation follows established patterns, includes proper cache invalidation, confirmation dialogs, and adheres to custom rules. The typo won't cause runtime errors due to variable scoping but should be fixed for code quality.
  • Fix the typo in useFieldActions.tsx before merging

Important Files Changed

File Analysis

Filename Score Overview
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/useFieldActions.tsx 4/5 Adds handlePromoteRemoval function and hooks it up to the promote-removals action. Contains a typo in variable name prmoteRemovalMutation (missing 'o').
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/FieldActions.const.tsx 5/5 Converts actions arrays to readonly mapping objects based on status, adds PROMOTE_REMOVALS to dropdown actions, and updates labels/messages. Clean implementation following custom rule eb80ac35 for readonly mappings.
clients/admin-ui/src/features/data-discovery-and-detection/action-center/action-center.slice.ts 5/5 Adds promoteRemovalStagedResources mutation endpoint with proper invalidateTags for cache management. Clean implementation.

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.

5 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

const [promoteResourcesMutation] = usePromoteResourcesMutation();
const [unMuteMonitorResultAssetsMutation] = useUnmuteResourcesMutation();
const [updateResourcesCategoryMutation] = useUpdateResourceCategoryMutation();
const [prmoteRemovalMutation] = usePromoteRemovalStagedResourcesMutation();
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: typo: prmoteRemovalMutation missing 'o' - should be promoteRemovalMutation

Suggested change
const [prmoteRemovalMutation] = usePromoteRemovalStagedResourcesMutation();
const [promoteRemovalMutation] = usePromoteRemovalStagedResourcesMutation();

};

const handlePromoteRemoval = async (urns: string[]) => {
return prmoteRemovalMutation({
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: update variable reference after fixing typo on line 60

Suggested change
return prmoteRemovalMutation({
return promoteRemovalMutation({

Copy link
Contributor

@gilluminate gilluminate left a comment

Choose a reason for hiding this comment

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

Overall looks good. One grammar fix is needed for when there's only 1 item selected. I did notice during testing that restoring an item will put it in the "confirmed" status. Is that expected?

Comment on lines 181 to 182
"promote-removals": (targetItemCount: number) =>
`Are you sure you want to remove these ${targetItemCount.toLocaleString()} resources?`,
Copy link
Contributor

Choose a reason for hiding this comment

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

This will end up being weird if only 1 item is selected

Suggested change
"promote-removals": (targetItemCount: number) =>
`Are you sure you want to remove these ${targetItemCount.toLocaleString()} resources?`,
"promote-removals": (targetItemCount: number) =>
`Are you sure you want to remove ${targetItemCount.toLocaleString()} ${pluralize(targetItemCount, "resource", "resources")}?`,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't use that message for single items but I can add that since it isn't obvious/if someone decides to change that behavior.
Yes, that is currently expected but Adam is working to change that.

chore: add remove action to dropdown

fix: linting and formatting

fix: adding disabled message

wip: conditional action types

feat: conditional actions

chore: adding mute action to removals

chore: update changelog

fix: typo
@speaker-ender speaker-ender added this pull request to the merge queue Nov 17, 2025
Merged via the queue into main with commit aa00662 Nov 17, 2025
47 checks passed
@speaker-ender speaker-ender deleted the feat/support-removals--ENG-1595 branch November 17, 2025 17:21
jjdaurora pushed a commit that referenced this pull request Dec 5, 2025
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