remove tree in mui with untitled ui#29911
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
🔴 Playwright Results — 7 failure(s), 2 flaky✅ 429 passed · ❌ 7 failed · 🟡 2 flaky · ⏭️ 16 skipped
Genuine Failures (failed on all attempts)❌
|
Code Review ✅ Approved 6 resolved / 6 findingsReplaced legacy MUI tree selectors with a unified Untitled UI TreeSelect component, resolving issues with async data fetching, selection state mismatches, and component re-renders. All previously identified bugs, including ID divergence in glossary terms and race conditions in data fetching, have been addressed. ✅ 6 resolved✅ Bug: AbortController never wired to fetchData; stale search results race
✅ Bug: TreeSelect ignores external value prop changes after first mount
✅ Performance: isNodeSelected is a new function each render, defeating renderNodes memo
✅ Bug: Aborted root fetch can clear loading of a newer in-flight search
✅ Bug: Duplicate InlineAlertProps import breaks compilation
...and 1 more resolved from earlier reviews OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
1 similar comment
Code Review ✅ Approved 6 resolved / 6 findingsReplaced legacy MUI tree selectors with a unified Untitled UI TreeSelect component, resolving issues with async data fetching, selection state mismatches, and component re-renders. All previously identified bugs, including ID divergence in glossary terms and race conditions in data fetching, have been addressed. ✅ 6 resolved✅ Bug: AbortController never wired to fetchData; stale search results race
✅ Bug: TreeSelect ignores external value prop changes after first mount
✅ Performance: isNodeSelected is a new function each render, defeating renderNodes memo
✅ Bug: Aborted root fetch can clear loading of a newer in-flight search
✅ Bug: Duplicate InlineAlertProps import breaks compilation
...and 1 more resolved from earlier reviews OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Describe your changes:
Fixes #

Uploading Screen Recording 2026-07-14 at 3.46.38 PM.mov…
I worked on ... because ...
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Summary by Gitar
MUIAsyncTreeSelectand associated legacy atoms/hooks with a newTreeSelectcomponent inopenmetadata-ui-core-components.MUIGlossaryTagSuggestiontoGlossaryTermTreeSelectandMUIDomainSelecttoDomainTreeSelect.TreeSelectimplementation including data fetching, search, and selection logic via new hooksuseTreeSelectData,useTreeSelectSearch, anduseTreeSelectSelection.TreeSelect.stories.tsxfor documentation and testing of the new component.AddDomainFormto utilize the newGlossaryTermTreeSelect.This will update automatically on new commits.
Greptile Summary
This PR replaces the legacy MUI tree select with the new shared TreeSelect. The main changes are:
Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
Comments Outside Diff (12)
openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 61-63 (link)Loaded term nodes use the bare term
nameasid, but preselected values inGlossaryTermTreeSelectusetag.tagFQN. A saved tag such asPII.Emailis seeded underPII.Emailwhile the visible node is keyed asEmail, so it does not show as selected and clicking it can add a duplicate tag instead of toggling the saved one.openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTermTreeSelect.tsx, line 235 (link)The shared
formUtilspath passes a renderedmuiLabelnode, but this branch forwardsundefinedunless the label is a string. Dynamic glossary-tag fields can lose their visible label and required marker even though the form still treats the field as required.openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 65 (link)tag.tagFQN, but fetched term nodes are still keyed by the bare termnamefirst. For a saved tag such asPII.Email, the selected value is stored underPII.Emailwhile the visible expanded node is keyed asEmail, so the checkbox does not show as selected and clicking the node can add a duplicate instead of toggling the saved tag.Context Used: CLAUDE.md (source)
openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 65 (link)Fetched glossary terms are still keyed by the short
namebefore the fully qualified name, while controlled selections are seeded withid: tag.tagFQN. For a nested term likePII.Email, the saved value is tracked underPII.Emailbut the expanded/search result node is tracked underEmail, so the checkbox or radio can appear unselected and clicking the visible node can add a duplicate instead of toggling the saved tag.Context Used: CLAUDE.md (source)
openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 65-66 (link)name, while controlled selections are seeded withid: tag.tagFQN. For a nested term such asPII.Email, the saved value is tracked underPII.Emailbut the expanded node is tracked underEmail, so the control does not show the saved term as selected and clicking it can add a duplicate instead of toggling it.openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 65 (link)Fetched term nodes still use the short
option.nameas theiridwhenever it exists, but controlled selections are seeded withid: tag.tagFQN. For a nested term such asPII.Email, the visible expanded/search result node is keyed asEmailwhile the saved selected node is keyed asPII.Email. The id-based selection map will not mark the visible node as selected, and clicking it can add or toggle a separate entry instead of the saved tag.Context Used: CLAUDE.md (source)
openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 65 (link)Fetched glossary term nodes still use the short
nameasid, but controlled selections are seeded withid: tag.tagFQN.TreeSelectchecks selection bynode.id, so a saved nested term likePII.Emailis stored underPII.Emailwhile the rendered node is keyed asEmail. The term can appear unselected, and clicking it can add or toggle a separate entry instead of the saved tag.Context Used: CLAUDE.md (source)
openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 65 (link)Loaded glossary term nodes are still keyed by the local
namebefore the fully qualified name, while controlled selections are reconstructed withid: tag.tagFQN. When a saved nested term likePII.Emailis loaded, the selected map is seeded underPII.Email, but the expanded node is keyed asEmail. The checkbox or radio can appear unchecked, and clicking the visible node can add or toggle a separate entry instead of the saved tag.Context Used: CLAUDE.md (source)
openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 65 (link)Fetched glossary term nodes still prefer the short
option.nameas theirid, while controlled selections are rebuilt withid: tag.tagFQN. When a saved nested term such asPII.Emailis rendered after expanding or searching, the visible node is keyed asEmailbut the selected value is keyed asPII.Email. The checkbox can appear unchecked, and clicking the node can add or toggle a separate entry instead of the saved tag.Context Used: CLAUDE.md (source)
openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 65 (link)Fetched term nodes still use the short
nameas theiridwhenever it exists, while controlled selections are rebuilt withid: tag.tagFQN.TreeSelectchecks selection by node id, so a saved nested term likePII.Emailis stored underPII.Emailbut the expanded or searched node is keyed asEmail. The checkbox can appear unchecked, and clicking the visible node can add or toggle a separate entry instead of the saved tag.Context Used: CLAUDE.md (source)
openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 65 (link)option.nameas theirid, while controlled selections are seeded withid: tag.tagFQN. For a nested term such asPII.Email, the rendered node is keyed asEmailwhile the saved value is keyed asPII.Email. Since selection is checked by node id, the checkbox or radio can appear unselected, and clicking the visible term can add or toggle a separate entry instead of the saved tag.Context Used: CLAUDE.md (source)
openmetadata-ui/src/main/resources/ui/src/components/common/GlossaryTermTreeSelect/GlossaryTagSuggestionUtils.ts, line 65 (link)Fetched term nodes are still keyed by the short
option.name, while controlled selections are rebuilt withid: tag.tagFQN. For a nested term likePII.Email, the expanded or searched node is keyed asEmailbut the saved selected value is keyed asPII.Email. The visible term can appear unselected, and clicking it can add or toggle a separate entry instead of the saved tag.Context Used: CLAUDE.md (source)
Reviews (19): Last reviewed commit: "fix gitar bot comment" | Re-trigger Greptile
Context used (3)