Skip to content

Conversation

@vcruces
Copy link
Contributor

@vcruces vcruces commented Nov 3, 2025

Ticket ENG-1777

Description Of Changes

Fixed an issue in the action center tree where nested fields were marked as expandable nodes, causing the UI to attempt to load children that were already loaded at the parent level.

Root cause: The backend uses the StagedResource.children column to determine which resources have children. For nested fields, this column stores a flattened list of all descendants (children, grandchildren, etc.) rather than just direct children. This means when you expand a parent field, you already see all nested fields in the tree. However, those nested fields still appear as expandable themselves, which would just show the same children again.

Solution: The fix ensures that all FIELD type resources are treated as leaf nodes in the tree UI, regardless of what the has_grandchildren flag indicates. This prevents the UI from attempting to expand field-level nodes where the backend would return an unexpected flattened hierarchy.

Code Changes

  • Updated MonitorTree.tsx to mark all FIELD resources as leaf nodes (isLeaf: true). This prevents fields with nested children from showing as expandable in the tree UI

Steps to Confirm

  • Navigate to a datastore monitor with nested fields
  • Expand the tree to the field level
  • Verify that fields with nested children no longer show an expand arrow/icon
  • Verify that the tree navigation still works correctly for Database → Schema → Table hierarchy
  • Confirm that field-level nodes are selectable but not expandable

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 3, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Nov 3, 2025 8:35pm
fides-privacy-center Ignored Ignored Nov 3, 2025 8:35pm

@vcruces vcruces marked this pull request as ready for review November 3, 2025 20:48
@vcruces vcruces requested a review from a team as a code owner November 3, 2025 20:48
@vcruces vcruces requested review from gilluminate and removed request for a team November 3, 2025 20:48
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 fixes a UI bug where nested fields in the action center tree were incorrectly showing expand arrows. The root cause was that the backend stores flattened descendants in StagedResource.children, so expanding a parent field already displays all nested fields. The fix adds a check in MonitorTree.tsx:65-67 to treat all FIELD type resources as leaf nodes, preventing the UI from attempting to expand them.

  • Fixed tree expansion logic by adding StagedResourceTypeValue.FIELD check to isLeaf determination
  • Updated changelog with appropriate description in the "Changed" section

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a straightforward frontend logic fix that adds a simple condition to prevent FIELD resources from being expandable in the tree UI. The logic is sound and addresses the root cause correctly. No breaking changes, backend modifications, or complex state management involved.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/MonitorTree.tsx 5/5 Added logic to treat all FIELD resources as leaf nodes in tree, preventing incorrect expansion of nested fields
CHANGELOG.md 5/5 Added changelog entry documenting the tree depth limitation fix

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@gilluminate gilluminate left a comment

Choose a reason for hiding this comment

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

straight forward improvement

@vcruces vcruces added this pull request to the merge queue Nov 3, 2025
Merged via the queue into main with commit 3ab6dda Nov 3, 2025
47 checks passed
@vcruces vcruces deleted the ENG-1777 branch November 3, 2025 21:10
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