Skip to content

feat(ui): update Domain & Glossary components for lazy-load utility pattern#29065

Merged
shah-harshit merged 7 commits into
mainfrom
feat/lazy-util-pr5-domain-glossary
Jun 17, 2026
Merged

feat(ui): update Domain & Glossary components for lazy-load utility pattern#29065
shah-harshit merged 7 commits into
mainfrom
feat/lazy-util-pr5-domain-glossary

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Updates Domain and Glossary components to import from extracted pure utility modules
  • Updates DomainUtils, GlossaryUtils, ClassificationUtils, TagsUtils imports
  • Updates Tag components and pages for consistent utility usage

Ref: open-metadata/openmetadata-collate#4230

Greptile Summary

This PR systematically removes barrel re-exports from GlossaryUtils, TagsUtils, DomainUtils, and ClassificationUtils, requiring callers to import pure utility functions directly from their *PureUtils source modules. The change also updates GenericProvider/GenericContext import paths and corrects several test mocks to target the right modules.

  • 89 files updated to import from GlossaryPureUtils, TagsPureUtils, DomainFilterUtils, ClassificationPureUtils, FeedUtilsPure, SearchPureUtils, and EntityDiffPureUtils instead of their barrel counterparts.
  • Test files corrected: GlossaryTermTab.test.tsx now spreads jest.requireActual('GlossaryPureUtils'), restoring permissionForApproveOrReject and other previously missing symbols; GlossaryTermsV1.test.tsx and several others properly split GenericContext/GenericProvider mocks.
  • One missed file: EntityTagUtils.ts (not in the PR) still imports getTableTags from TagsUtils whose re-export was removed here, causing a TypeScript compile error.

Confidence Score: 4/5

Safe to merge once EntityTagUtils.ts is updated to import getTableTags from TagsPureUtils; without that fix the TypeScript build will fail.

The vast majority of the 89-file migration is correct and consistent. One file outside the PR's diff — EntityTagUtils.ts — still imports getTableTags from TagsUtils, whose re-export was deleted here. This will produce a TypeScript compile error at build time. Everything else, including the previously flagged missing permissionForApproveOrReject mock and the stale GlossaryUtils/TasksUtils imports, is properly addressed.

openmetadata-ui/src/main/resources/ui/src/utils/EntityTagUtils.ts — its getTableTags import from TagsUtils will break after this PR's re-export removal.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.tsx Removes re-exports of GlossaryPureUtils functions so callers must import directly from GlossaryPureUtils; core implementations remain intact.
openmetadata-ui/src/main/resources/ui/src/utils/TagsUtils.tsx Removes re-exports of TagsPureUtils functions; EntityTagUtils.ts still imports the now-removed getTableTags from this file, causing a compile error.
openmetadata-ui/src/main/resources/ui/src/utils/DomainUtils.tsx Removes re-exports of DomainFilterUtils functions; all known callers in the PR have been updated to import from DomainFilterUtils directly.
openmetadata-ui/src/main/resources/ui/src/utils/ClassificationUtils.tsx Removes re-exports of ClassificationPureUtils functions; ClassificationDetails now imports getClassificationInfo directly from ClassificationPureUtils.
openmetadata-ui/src/main/resources/ui/src/utils/EntityTagUtils.ts Not changed in this PR, but still imports getTableTags from TagsUtils whose re-export was removed here — this file will fail to compile.
openmetadata-ui/src/main/resources/ui/src/utils/TasksUtils.ts Correctly migrated getGlossaryBreadcrumbs import from GlossaryUtils to GlossaryPureUtils.
openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTermTab/GlossaryTermTab.test.tsx Updated mock from GlossaryUtils to GlossaryPureUtils with jest.requireActual spread, fixing the previously noted missing permissionForApproveOrReject export.
openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx Component correctly migrated to import updateCertificationTag and updateTierTag from TagsPureUtils, but its test file was not updated accordingly.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before["Before (barrel re-exports)"]
        GU["GlossaryUtils.tsx\n(re-exports GlossaryPureUtils)"]
        TU["TagsUtils.tsx\n(re-exports TagsPureUtils)"]
        DU["DomainUtils.tsx\n(re-exports DomainFilterUtils)"]
        CU["ClassificationUtils.tsx\n(re-exports ClassificationPureUtils)"]
        Callers1["Components / Pages"] --> GU & TU & DU & CU
    end

    subgraph After["After (direct imports)"]
        GPU["GlossaryPureUtils"]
        TPU["TagsPureUtils"]
        DFU["DomainFilterUtils"]
        CPU["ClassificationPureUtils"]
        GU2["GlossaryUtils.tsx\n(own exports only)"]
        TU2["TagsUtils.tsx\n(own exports only)"]
        Callers2["Components / Pages"]
        Callers2 --> GPU & TPU & DFU & CPU
        Callers2 --> GU2 & TU2

        ETU["EntityTagUtils.ts\n❌ still imports getTableTags\nfrom TagsUtils"]
        ETU -. compile error .-> TU2
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph Before["Before (barrel re-exports)"]
        GU["GlossaryUtils.tsx\n(re-exports GlossaryPureUtils)"]
        TU["TagsUtils.tsx\n(re-exports TagsPureUtils)"]
        DU["DomainUtils.tsx\n(re-exports DomainFilterUtils)"]
        CU["ClassificationUtils.tsx\n(re-exports ClassificationPureUtils)"]
        Callers1["Components / Pages"] --> GU & TU & DU & CU
    end

    subgraph After["After (direct imports)"]
        GPU["GlossaryPureUtils"]
        TPU["TagsPureUtils"]
        DFU["DomainFilterUtils"]
        CPU["ClassificationPureUtils"]
        GU2["GlossaryUtils.tsx\n(own exports only)"]
        TU2["TagsUtils.tsx\n(own exports only)"]
        Callers2["Components / Pages"]
        Callers2 --> GPU & TPU & DFU & CPU
        Callers2 --> GU2 & TU2

        ETU["EntityTagUtils.ts\n❌ still imports getTableTags\nfrom TagsUtils"]
        ETU -. compile error .-> TU2
    end
Loading

Comments Outside Diff (1)

  1. openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.tsx, line 33-50 (link)

    P1 Missing import updates in callers outside this PR

    The re-exports removed from GlossaryUtils and TagsUtils in this PR are still imported from the old modules by at least five files not touched here, causing a compile/runtime break:

    • src/components/common/AsyncSelectList/TreeAsyncSelectList.tsx imports filterTreeNodeOptions and findItemByFqn from GlossaryUtils (line 53–57)
    • src/utils/TasksUtils.ts imports getGlossaryBreadcrumbs from GlossaryUtils (line 102)
    • src/components/common/AsyncSelectList/AsyncSelectList.tsx imports getTagDisplay from TagsUtils (line 38)
    • src/components/common/TagSuggestion/TagSuggestion.tsx imports getTagDisplay from TagsUtils (line 29)
    • src/components/KnowledgeCenter/QuickLinkFormModal/QuickLinkFormModal.tsx imports getTagDisplay from TagsUtils

    All three of these symbols (filterTreeNodeOptions, findItemByFqn, getTagDisplay) were among the re-exports removed in this PR. These callers need to be updated to import directly from GlossaryPureUtils / TagsPureUtils, or the re-exports need to be kept until all consumers are migrated.

Reviews (4): Last reviewed commit: "Fix conflicts" | Re-trigger Greptile


Summary by Gitar

  • Refactored GenericProvider:
    • Decoupled GenericContext creation from GenericProvider by migrating to a dedicated GenericContext module and removed unnecessary once wrappers.
    • Updated all components and test files to consume useGenericContext and GenericProvider from their new respective locations.

This will update automatically on new commits.

…attern

Updates Domain and Glossary components to import from extracted pure utility modules. Updates DomainUtils, GlossaryUtils, ClassificationUtils, TagsUtils imports. Updates Tag components and pages for consistent utility usage.

Ref: open-metadata/openmetadata-collate#4230

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shah-harshit shah-harshit requested a review from a team as a code owner June 16, 2026 08:48
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Jun 16, 2026
@shah-harshit shah-harshit self-assigned this Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@shah-harshit shah-harshit added the skip-pr-checks Bypass PR metadata validation check label Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.32% (66851/107263) 43.93% (37146/84541) 45.71% (11449/25045)

Comment thread openmetadata-ui/src/main/resources/ui/src/utils/Domain/LazyDomainComponents.tsx Outdated
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (12 flaky)

✅ 4286 passed · ❌ 0 failed · 🟡 12 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 301 0 1 4
🟡 Shard 2 808 0 1 9
🟡 Shard 3 810 0 1 8
🟡 Shard 4 846 0 3 12
🟡 Shard 5 732 0 1 47
🟡 Shard 6 789 0 5 8
🟡 12 flaky test(s) (passed on retry)
  • Pages/Roles.spec.ts › Roles page should work properly (shard 1, 2 retries)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/KnowledgeCenterList.spec.ts › Knowledge Center List - Verify Recently Viewed widget (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Number (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Contract Status badge should be visible on condition if Contract Tab is present/hidden by Persona (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/Lineage/PlatformLineage.spec.ts › Verify domain platform view (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@shah-harshit shah-harshit merged commit 95327a5 into main Jun 17, 2026
53 checks passed
@shah-harshit shah-harshit deleted the feat/lazy-util-pr5-domain-glossary branch June 17, 2026 04:56
@gitar-bot

gitar-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 2 resolved / 2 findings

Refactors Domain and Glossary components to use pure utility modules but currently breaks the build due to broken imports in EntityTagUtils.ts and unresolved merge conflict markers in LazyDomainComponents.tsx.

✅ 2 resolved
Quality: New LazyDomainComponents.tsx is unused dead code

📄 openmetadata-ui/src/main/resources/ui/src/utils/Domain/LazyDomainComponents.tsx:14-28
The new file utils/Domain/LazyDomainComponents.tsx exports LazyDataQualityDashboard, but no other file in the codebase imports it. DomainDetails.component.tsx does not reference it, and the Data Quality dashboard is loaded through DomainClassBase.ts which imports DataQualityDashboard.component directly (DomainClassBase.ts:17). As added, this module is dead code — it adds an unreferenced lazy wrapper and a DataQualityDashboard.component import that is never exercised.

If this is intended to be wired up in a later PR of the lazy-load series, that's fine, but consider either (a) actually consuming LazyDataQualityDashboard in DomainClassBase/DomainDetails to realize the lazy-load benefit, or (b) deferring the file until the consumer change lands, to avoid shipping unreferenced code.

Bug: Unresolved merge conflict markers in LazyDomainComponents.tsx

📄 openmetadata-ui/src/main/resources/ui/src/utils/Domain/LazyDomainComponents.tsx:14-28
LazyDomainComponents.tsx contains unresolved Git merge conflict markers (<<<<<<<, =======, >>>>>>>) at lines 15-18 and 30-39. This is invalid TypeScript/JSX and will fail to compile, breaking the build. The main side adds a Loader import and a non-null Suspense fallback while the feature branch keeps fallback={null}. The conflict must be resolved by picking one implementation.

Note: a previous review concluded the fallback={null} was intentional; the merge from main reintroduced a Loader fallback. Decide which fallback is desired and remove all conflict markers.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants