Skip to content

Implement multi-page "select all" for Okta monitor results#7307

Merged
jpople merged 12 commits intomainfrom
jpople/eng-2222/okta-monitor-select-all
Feb 5, 2026
Merged

Implement multi-page "select all" for Okta monitor results#7307
jpople merged 12 commits intomainfrom
jpople/eng-2222/okta-monitor-select-all

Conversation

@jpople
Copy link
Copy Markdown
Contributor

@jpople jpople commented Feb 4, 2026

Ticket ENG-2222

Description Of Changes

Implements multi-page select-all and bulk action functionality for Okta monitors.

Code Changes

  • Update bulk actions and selection hooks to add select-all
  • Update MSW mocks to return multi-page response for testing

Steps to Confirm

Probably easiest to test using the new mocks, so run npm run dev:mock (I ran into some strange issues trying to do this with Turbo, but maybe that's just my machine) to get a multi-page response

  1. View Okta monitor results
  2. Should see multiple pages of results if using the mock
  3. Should be able to individually select results and take bulk actions
  4. Should be able to "select all" and take bulk actions on every result across all pages
  5. Should be able to individually deselect results and see them in the "excluded" field in a bulk action request body
  6. Currently applied filters should show in all bulk action request bodies

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

@jpople jpople requested a review from a team as a code owner February 4, 2026 08:34
@jpople jpople requested review from lucanovera and removed request for a team February 4, 2026 08:34
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Feb 4, 2026

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

Project Deployment Actions Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment Feb 4, 2026 11:52pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored Feb 4, 2026 11:52pm

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 4, 2026

Greptile Overview

Greptile Summary

implements multi-page "select all" functionality for Okta monitor results with two selection modes: explicit (individual selections) and all (select everything with exclusions)

Key Changes:

  • adds selectionMode state that switches between explicit selection and "select all" mode
  • tracks excluded items by URN when in "all" mode to support deselection
  • filters are passed to backend for bulk actions, allowing server-side filtering
  • selection automatically clears when filters change to prevent stale selections
  • adds 150 mock infrastructure systems for multi-page testing

Issues Found:

  • inconsistent request body format between bulk-promote (wraps urns in object) and bulk-mute/bulk-unmute (sends urns directly) in discovery-detection.slice.ts:419-436
  • significant code duplication in mock handlers - the filter application logic is repeated identically across three bulk action handlers (handlers.ts:197-430)

Confidence Score: 3/5

  • safe to merge after fixing the request body format inconsistency in bulk-promote
  • the logic inconsistency in the slice file could cause the bulk-promote endpoint to fail when using the explicit mode with urns, as the backend likely expects the same format across all three endpoints
  • pay close attention to discovery-detection.slice.ts for the request body format issue, and consider refactoring handlers.ts to reduce duplication

Important Files Changed

Filename Overview
clients/admin-ui/src/features/data-discovery-and-detection/action-center/hooks/useInfrastructureSystemsSelection.tsx adds multi-page select-all logic with two modes (explicit/all) and URN-based exclusion tracking, clears selection on filter changes
clients/admin-ui/src/features/data-discovery-and-detection/action-center/hooks/useInfrastructureSystemsBulkActions.tsx adds support for filter-based bulk actions with exclusions, extracts count from backend response summary
clients/admin-ui/src/features/data-discovery-and-detection/discovery-detection.slice.ts adds bulkSelection parameter to bulk action mutations with filters and exclude_urns, has inconsistent request body format
clients/admin-ui/src/mocks/action-center/handlers.ts adds MSW handlers for filters and bulk actions with significant code duplication across handlers

Copy link
Copy Markdown
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.

4 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link
Copy Markdown
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.

Tested locally and works as expected.
Minor nits and questions

url: `/plus/identity-provider-monitors/${monitor_config_key}/results/bulk-mute`,
body: urns,
}),
query: ({ monitor_config_key, urns, bulkSelection }) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason why passing both args is disallowed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The backend will error if both are provided and nonempty so I preferred enforcing that here. Technically the UI shouldn't ever be in a state where we have a value for both, but if the selection itself is working correctly it shouldn't cause any harm, if you think just passing both is better.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oof that's not good api design imo bc there is not way to know that without looking at comments in the docs (if they even exist).
I'm fine with leaving as is to help reduce invalid queries but I'd add some comments about why.
Alternatively you could make a discriminated union type that would disallow certain combinations of filters lol.

Comment on lines +90 to +98
bulkSelection?: {
filters?: {
search?: string;
diff_status?: DiffStatus | DiffStatus[];
vendor_id?: string | string[];
data_uses?: string[];
};
exclude_urns?: string[];
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a need to abstract part of the raw filters?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good callout-- I've made a new type for these filter values and applied it to other areas where they're used.

Comment on lines +182 to +184
excludedKeys,
excludedUrns,
selectionMode,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason why the useBulkListSelect hook wasn't able to work here? (I realize this hook wasn't added in the PR)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I messed with this a good bit and it seems impractical to integrate useBulkListSelect with the existing custom selection hook. I think it could probably be rewritten to use useBulkListSelect directly and obviate the custom hook entirely but it'd be a larger undertaking and I'd rather not let that block merging at this point.

@jpople jpople added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit 8dbb35a Feb 5, 2026
45 of 46 checks passed
@jpople jpople deleted the jpople/eng-2222/okta-monitor-select-all branch February 5, 2026 14:41
@greptile-apps greptile-apps bot mentioned this pull request Feb 6, 2026
18 tasks
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.

2 participants