Skip to content

Conversation

@gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Nov 5, 2025

Ticket ENG-1599

Description Of Changes

Added keyboard shortcuts to the Action Center fields page to improve user efficiency when processing discovered assets. Users can now:

  • Press a to approve the focused item
  • Press c to confirm/promote the focused item
  • Press i to ignore/mute the focused item
  • Press r to restore/un-mute the focused item
  • Press o to open the details drawer for the focused item
  • Press e to open the classification select dropdown for assigning data categories (whether in the drawer or on the list item, depending if the drawer is open)
  • Press Escape to close the classification select and return focus to the list

The shortcuts are context-aware and will display warning messages when actions are unavailable for the current item's status. The implementation includes a new useFieldActionHotkeys hook that handles all keyboard shortcut logic, and the drawer now auto-updates to show the focused item's details when navigating with arrow keys.

Code Changes

  • Added useFieldActionHotkeys hook to handle keyboard shortcuts for field actions
  • Added FIELD_ACTION_HOTKEYS constant defining shortcut keys
  • Renamed DROPDOWN_ACTIONS_DISABLED_TOOLTIP to ACTIONS_DISABLED_MESSAGE for reuse across tooltips and hotkey warnings
  • Added urn prop to ClassificationSelect component with data-classification-select attribute for DOM targeting
  • Added useEffect in page component to sync drawer content with focused list item during keyboard navigation

Steps to Confirm

  1. Navigate to Action Center → Select a datastore monitor with discovered fields
  2. Use j and k keys to navigate through the field list
  3. Press a on a field with a data category to approve it
  4. Press c on a field with a data category to confirm it
  5. Press i to ignore a field
  6. Press r on an ignored field to restore it
  7. Press o to open the details drawer
  8. Press e to open the classification select dropdown
  9. Navigate through categories with arrow keys, press Escape to close
  10. Verify warning messages appear when trying to perform unavailable actions

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

@gilluminate gilluminate force-pushed the gill/ENG-1599/keyboard-hotkeys-for-field-actions branch from fc9bb3e to 2e400be Compare November 5, 2025 00:34
@gilluminate gilluminate marked this pull request as ready for review November 5, 2025 00:35
@gilluminate gilluminate requested a review from a team as a code owner November 5, 2025 00:35
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 adds keyboard shortcuts for field actions in the Action Center to improve user efficiency when processing discovered assets. The implementation includes a new useFieldActionHotkeys hook that handles shortcuts for approve (a), confirm (c), ignore (i), restore (r), open drawer (o), and open classification select (e).

Key changes:

  • New useFieldActionHotkeys hook with context-aware keyboard shortcuts
  • Auto-sync drawer content with focused list item during keyboard navigation
  • Renamed DROPDOWN_ACTIONS_DISABLED_TOOLTIP to ACTIONS_DISABLED_MESSAGE for reuse across tooltips and hotkey warnings
  • Added urn prop to ClassificationSelect with data-classification-select attribute for DOM targeting

Issues found:

  • Missing updateSelectedListItem in dependency arrays for four useHotkeys calls, which could cause stale closures and incorrect behavior when the function reference changes

Confidence Score: 4/5

  • This PR is safe to merge after fixing the missing dependency arrays
  • The implementation is well-structured with proper separation of concerns, but has critical dependency array issues in the hotkeys hook that could lead to stale closures. Once the missing updateSelectedListItem dependency is added to the four useHotkeys calls, the PR will be safe to merge.
  • Pay close attention to useFieldActionHotkeys.ts - fix the missing dependencies before merging

Important Files Changed

File Analysis

Filename Score Overview
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/useFieldActionHotkeys.ts 4/5 New hook implementing keyboard shortcuts for field actions with proper DOM manipulation and context-aware behavior
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/page.tsx 5/5 Integrated the new hotkeys hook and added drawer sync effect, renamed constant for clarity

6 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@speaker-ender speaker-ender left a comment

Choose a reason for hiding this comment

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

If we think the behavior here is fine I can approve but I'd like to revisit some of these patterns.
More specifically, making the actions generic + dynamic so that way it's easy to re-use for other screens.

@gilluminate gilluminate force-pushed the gill/ENG-1599/keyboard-hotkeys-for-field-actions branch from 9d25084 to 863d3c5 Compare November 5, 2025 18:31
@gilluminate gilluminate enabled auto-merge November 5, 2025 18:31
@gilluminate gilluminate added this pull request to the merge queue Nov 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Nov 5, 2025
@gilluminate gilluminate force-pushed the gill/ENG-1599/keyboard-hotkeys-for-field-actions branch from 863d3c5 to f9d4514 Compare November 5, 2025 19:29
@gilluminate gilluminate enabled auto-merge November 5, 2025 19:29
@gilluminate gilluminate added this pull request to the merge queue Nov 5, 2025
Merged via the queue into main with commit 67cf507 Nov 5, 2025
47 checks passed
@gilluminate gilluminate deleted the gill/ENG-1599/keyboard-hotkeys-for-field-actions branch November 5, 2025 19:59
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