Skip to content

Conversation

@speaker-ender
Copy link
Contributor

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

Ticket ENG-1789

Description Of Changes

Selected fields are de-selected after performing an action to prevent issues with async states.
Previously, if you selected multiple items and then performed an action, you would still have the same selection but with potentially stale states to base actionable logic.
Since we are not polling the state for each field, this can lead to invalid actions being available to a user.

Code Changes

  • Adds the reset function to the action dropdown event to reset selections

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. Select multiple fields using the checkboxes
  4. Use the action dropdown to perform an available action
  5. Confirm that you no longer have any selected fields

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

@speaker-ender speaker-ender force-pushed the refactor/deselect-on-action branch from eb452a4 to 9522172 Compare November 11, 2025 13:47
@speaker-ender speaker-ender marked this pull request as ready for review November 11, 2025 13:48
@speaker-ender speaker-ender requested a review from a team as a code owner November 11, 2025 13:48
@speaker-ender speaker-ender requested review from jpople and removed request for a team November 11, 2025 13:48
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 11, 2025

Greptile Overview

Greptile Summary

This PR prevents stale state issues by clearing field selections after performing actions in the action center. The change makes action handlers async and calls resetListSelect() after both bulk and individual field actions complete.

  • Changed action dropdown onClick handlers from synchronous to async (lines 340-358)
  • Added await keywords to both bulkActions[actionType]() and fieldActions[actionType]() calls to ensure actions complete before deselecting
  • Called resetListSelect() after action completion to clear selected items
  • Updated CHANGELOG.md to document the behavior change

This addresses the issue where users could have stale selections after performing actions, potentially allowing invalid subsequent actions.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are minimal, well-scoped, and improve the UX by preventing stale state issues. The async/await pattern is correct - both action functions return promises, and resetListSelect is synchronous. The change maintains proper sequencing by awaiting action completion before clearing selections.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
CHANGELOG.md 5/5 Added changelog entry documenting the deselection behavior change in action center
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/page.tsx 5/5 Made action onClick handlers async and added resetListSelect call to clear selections after actions complete

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.

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 as expected.

fix: linting and formatting

chore: update changelog
@speaker-ender speaker-ender force-pushed the refactor/deselect-on-action branch from 9522172 to e7dfe5f Compare November 12, 2025 16:24
@speaker-ender speaker-ender added this pull request to the merge queue Nov 12, 2025
Merged via the queue into main with commit 4ba1b73 Nov 12, 2025
47 checks passed
@speaker-ender speaker-ender deleted the refactor/deselect-on-action branch November 12, 2025 16:58
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