Skip to content

Conversation

@lucanovera
Copy link
Contributor

@lucanovera lucanovera commented Nov 21, 2025

Ticket ENG-2088

Description Of Changes

Setups mocks responses for an Okta monitor. Creates boilerplate component and hook to handle action center results for infrastructure monitors.

Code Changes

  • Setup msw mocks for the action-center results table (will show just an okta monitor)
  • Setup msw mock for okta monitors results
  • Adds action-center/instrastructure pages
  • Adds DiscoveredInfrastructureSystemsTable.tsx and 2 hooks as boilerplate examples

Steps to Confirm

  1. Run npm run msw:mock
  2. Login to Fides and go to Settings > About to enable feature flag "Helios v2"
  3. Go to the Detection and Discovery > Action Center
  4. Check that an "Okta identity provider" monitor appears in the results
  5. Click on the monitor
  6. Check that it takes you to a page with a Table with a mocked "Salesforce result" (The table is quite empty as it's just a boilerplate)

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

@lucanovera lucanovera requested a review from a team as a code owner November 21, 2025 21:23
@vercel
Copy link

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

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 21, 2025

Greptile Overview

Greptile Summary

This PR adds boilerplate UI components and mock data for Okta infrastructure monitors in the action center. Created reusable hooks (useDiscoveredInfrastructureSystemsColumns, useDiscoveredInfrastructureSystemsTable) and a table component (DiscoveredInfrastructureSystemsTable) to display discovered infrastructure systems with add/ignore actions.

Key changes:

  • Added new hooks for managing infrastructure systems table with sorting, search, pagination, and bulk actions
  • Created mock Okta monitor and app data for testing
  • Added MSW handlers for discovery monitor endpoints
  • Created boilerplate pages for the infrastructure monitor route

Issues found:

  • Missing error handling in row-level add/ignore actions in useDiscoveredInfrastructureSystemsColumns.tsx:32-50
  • Non-standard navigation pattern using window.location.href instead of Next.js router
  • Unused onTabChange parameter

Confidence Score: 3/5

  • This PR is mostly safe but has missing error handling that should be addressed
  • Score reflects solid boilerplate structure with proper patterns in most areas, but missing error handling in row-level mutation actions could lead to silent failures. The bulk actions in useDiscoveredInfrastructureSystemsTable handle errors correctly, but individual row actions do not
  • Pay attention to useDiscoveredInfrastructureSystemsColumns.tsx for the missing error handling in mutation callbacks

Important Files Changed

File Analysis

Filename Score Overview
clients/admin-ui/src/features/data-discovery-and-detection/action-center/hooks/useDiscoveredInfrastructureSystemsColumns.tsx 3/5 Added new hook for infrastructure systems columns with missing error handling and non-standard navigation pattern
clients/admin-ui/src/features/data-discovery-and-detection/action-center/hooks/useDiscoveredInfrastructureSystemsTable.tsx 4/5 Added comprehensive hook for infrastructure systems table with proper error handling and state management
clients/admin-ui/src/features/data-discovery-and-detection/action-center/tables/DiscoveredInfrastructureSystemsTable.tsx 5/5 Added clean table component with proper structure and accessibility features

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.

8 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile


interface UseDiscoveredInfrastructureSystemsColumnsConfig {
monitorId: string;
onTabChange: (tab: ActionCenterTabHash) => Promise<void>;
Copy link
Contributor

Choose a reason for hiding this comment

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

style: onTabChange parameter is unused and should be removed

Comment on lines 32 to 50
const handleAddSystem = useCallback(
async (systemId: string) => {
await addMonitorResultSystemsMutation({
monitor_config_key: monitorId,
resolved_system_ids: [systemId],
});
},
[addMonitorResultSystemsMutation, monitorId],
);

const handleIgnoreSystem = useCallback(
async (systemId: string) => {
await ignoreMonitorResultSystemsMutation({
monitor_config_key: monitorId,
resolved_system_ids: [systemId],
});
},
[ignoreMonitorResultSystemsMutation, monitorId],
);
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: missing error handling for mutation failures - these functions should check isErrorResult() and display error toasts like the similar pattern in DiscoveredSystemActionsCell.tsx:54-74

@lucanovera lucanovera changed the title Draft: Add mocks and boilerplate UI for Okta monitors Add mocks and boilerplate UI for Okta monitors Nov 21, 2025
Comment on lines 19 to 24
onCell: (record: SystemStagedResourcesAggregateRecord) => ({
onClick: () => {
window.location.href = rowClickUrl(record);
},
style: { cursor: "pointer" },
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

We've been moving away from this row click pattern in favor of the main column text being a link. Are you sure we should be using it in this boilerplate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice catch, I'll remove that

@lucanovera lucanovera enabled auto-merge November 21, 2025 22:01
@lucanovera lucanovera added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit b1912fb Nov 21, 2025
47 checks passed
@lucanovera lucanovera deleted the msw-okta-mock-example branch November 21, 2025 22:20
@greptile-apps greptile-apps bot mentioned this pull request Nov 25, 2025
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.

3 participants