ENG-1777 - Limit /tree endpoint depth to 4 levels #6907
Merged
+4
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.childrencolumn 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
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works