Skip to content

Conversation

@gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Nov 14, 2025

Ticket ENG-1946

Description Of Changes

Replaced the "restore" (un-mute) hotkey with a "refresh" hotkey in the Action Center fields view. The r key now refreshes the list instead of restoring/un-muting the active field.

Remove the drawer's mask (bg overlay) when using keyboard navigation to see what's active beneath more easily.

Additionally, fixed keyboard navigation by syncing the active list item when clicking on a field after using keyboard navigation, preventing state mismatch between keyboard and mouse interactions.

Code Changes

  • Renamed UN_MUTE hotkey constant to REFRESH in field actions
  • Updated useFieldActionHotkeys to call onRefresh callback instead of handleHotkeyAction(UN_MUTE)
  • Fixed dependency array for REFRESH hotkey to only include onRefresh
  • Updated CustomList HOC to expose setActiveListItemIndex function through onActiveItemChange callback
  • Updated page.tsx to sync keyboard navigation active index with mouse clicks
  • Added mask={!activeListItem} to ResourceDetailsDrawer
  • Fixed Cypress test flakiness with scrollIntoView() and { force: true } options

Steps to Confirm

  1. Navigate to Action Center fields view
  2. Use keyboard navigation (j/k) to activate fields
  3. Press r key and verify the field list refreshes
  4. Use keyboard (j/k) to activate a field again, then click a different field name with mouse to open the drawer.
  5. Verify the active state properly syncs to the clicked field
  6. Open keyboard shortcuts modal (?) and verify r is documented as "Refresh the list"

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
  • UX feedback:
    • No UX review needed
  • Followup issues:
    • No followup issues
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required

@vercel
Copy link

vercel bot commented Nov 14, 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 14, 2025 11:17pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
fides-privacy-center Ignored Ignored Nov 14, 2025 11:17pm

@gilluminate gilluminate marked this pull request as ready for review November 14, 2025 23:09
@gilluminate gilluminate requested a review from a team as a code owner November 14, 2025 23:09
@gilluminate gilluminate requested review from lucanovera and removed request for a team November 14, 2025 23:09
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 14, 2025

Greptile Overview

Greptile Summary

This PR replaces the "restore" (un-mute) hotkey with a "refresh" hotkey in the Action Center fields view, where pressing r now refreshes the list instead of restoring/un-muting fields. The PR also improves keyboard navigation by syncing the active list item when clicking with the mouse after using keyboard navigation, and removes the drawer's background overlay when keyboard navigation is active for better visibility.

Key changes:

  • Renamed UN_MUTE hotkey constant to REFRESH in FieldActions.const.tsx
  • Updated useFieldActionHotkeys to call onRefresh callback instead of handling unmute action
  • Enhanced CustomList HOC to expose setActiveListItemIndex function through onActiveItemChange callback
  • Fixed keyboard-mouse navigation state sync in page.tsx by updating active index when clicking items after keyboard navigation
  • Added mask={!activeListItem} to ResourceDetailsDrawer to hide overlay during keyboard navigation
  • Fixed flaky Cypress tests with scrollIntoView() and force: true click options

Issue found:

  • The useCallback dependency array in page.tsx:490 incorrectly includes setSetActiveListItemIndex and setActiveListItem (setState functions), which could cause unnecessary re-renders

Confidence Score: 4/5

  • This PR is safe to merge with one minor dependency array fix needed
  • The changes are well-structured and the hotkey replacement is straightforward. The keyboard-mouse navigation sync is a good UX improvement. However, the incorrect dependency array in the useCallback (including setState functions) could cause unnecessary re-renders, though it won't break functionality. The test fixes for flakiness are appropriate.
  • Pay attention to page.tsx - fix the dependency array issue before merging

Important Files Changed

File Analysis

Filename Score Overview
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/useFieldActionHotkeys.ts 5/5 Replaced UN_MUTE hotkey with REFRESH that calls onRefresh callback
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/page.tsx 4/5 Added keyboard-mouse navigation sync, removed drawer mask during keyboard navigation, passed refresh callback to hotkeys
clients/fidesui/src/hoc/CustomList.tsx 5/5 Exposed setActiveListItemIndex through onActiveItemChange callback for programmatic index updates

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.

7 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

…ion-center/fields/page.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@lucanovera
Copy link
Contributor

@gilluminate Everything looks good! But I wanted to clarify what you meant in steps 4 and 5? What does it mean to activate a field? The focused state? Also when clicking an item with the mouse the focus doesn't move. Finally, the keyboard actions are meant to happen only on the focused field and not the selected items (aka bulk action), right?

@gilluminate
Copy link
Contributor Author

gilluminate commented Nov 17, 2025

@lucanovera I use the term "active" because it's not focused in the traditional browser focus sense, it's just the highlighted list item. Sorry, I should have been more clear, you have to click the title of the list item to activate it, not just an arbitrary spot. I've updated the steps for more clarity.

Copy link
Contributor

@lucanovera lucanovera left a comment

Choose a reason for hiding this comment

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

Active state works as expected, new key action works, code changes look good. Approved!

@gilluminate gilluminate added this pull request to the merge queue Nov 17, 2025
Merged via the queue into main with commit 6a77320 Nov 17, 2025
47 checks passed
@gilluminate gilluminate deleted the gill/ENG-1946/hotkey-requests branch November 17, 2025 17:50
jjdaurora pushed a commit that referenced this pull request Dec 5, 2025
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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