Skip to content

Backport Group 3 utility extractions to 1.13 - #30025

Merged
shah-harshit merged 8 commits into
1.13from
ui/backport-group3-utility-splits-1.13
Jul 15, 2026
Merged

shah-harshit merged 8 commits into
1.13from
ui/backport-group3-utility-splits-1.13

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Testing

  • UI checkstyle sequence on Group 3 changed files: organize-imports-cli, eslint --fix, prettier --write.
  • git diff --check.
  • Verified no remaining imports to KnowledgePageUtils/KnowledgePagePureUtils/ContextCenterUtils/ContextCenterPureUtils.

Greptile Summary

This PR backports Group 3 UI utility extractions onto the 1.13 branch. The main changes are:

  • Lazy-loaded entity and settings route pages.
  • Extracted pure helper logic into separate utility modules.
  • Preserved existing utility import surfaces through wrapper re-exports.
  • Added coverage for glossary task permission behavior.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/AppRouter/SettingsRouter.tsx Replaces static settings page imports with lazy-loaded route components.
openmetadata-ui/src/main/resources/ui/src/components/AppRouter/EntityRouter.tsx Lazy-loads the entity version page through the shared suspense wrapper.
openmetadata-ui/src/main/resources/ui/src/components/AppRouter/EntityImportRouter.tsx Lazy-loads the bulk entity import page through the shared suspense wrapper.
openmetadata-ui/src/main/resources/ui/src/utils/AdvancedSearchUtils.tsx Re-exports extracted advanced search helpers from the new pure utility module.
openmetadata-ui/src/main/resources/ui/src/utils/AdvancedSearchPureUtils.ts Adds extracted pure advanced search helpers for labels, filters, buckets, and query-builder defaults.
openmetadata-ui/src/main/resources/ui/src/utils/GlossaryPureUtils.ts Adds extracted glossary helper logic, including glossary task permission handling.
openmetadata-ui/src/main/resources/ui/src/utils/QueryBuilderUtils.tsx Keeps the query builder utility surface available while moving pure helpers into a separate module.
openmetadata-ui/src/main/resources/ui/src/utils/Alerts/AlertsUtil.tsx Re-exports extracted alert helpers while keeping UI-specific alert utilities in place.
openmetadata-ui/src/main/resources/ui/src/utils/TableUtils.tsx Delegates table dropdown and tab helpers to split utility modules.
openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx Re-exports extracted entity utility helpers through the existing utility entry point.

Reviews (4): Last reviewed commit: "fix(ui): preserve assignee priority for ..." | Re-trigger Greptile

Context used:

  • Context used - CLAUDE.md (source)
  • Context used - openmetadata-ui-core-components/CLAUDE.md (source)

@shah-harshit
shah-harshit requested a review from a team as a code owner July 14, 2026 07:47
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Jul 14, 2026
@shah-harshit shah-harshit self-assigned this Jul 14, 2026
Base automatically changed from ui/backport-28672-feed-utils-1.13 to 1.13 July 14, 2026 16:28
shah-harshit and others added 6 commits July 14, 2026 22:03
* feat(ui): extract form/search/query/advanced-search/explore/classification/tags/glossary/knowledge-page pure utils

Create *PureUtils.ts files for framework-independent logic extracted from:
- formUtils.tsx → formPureUtils.ts (transformErrors, getPopupContainer, etc.)
- SearchUtils.tsx → SearchPureUtils.ts (getEntityTypeFromSearchIndex, parseBucketsData, getTermQuery)
- QueryBuilderUtils.tsx → QueryBuilderPureUtils.ts (all non-JSX query builder logic)
- AdvancedSearchUtils.tsx → AdvancedSearchPureUtils.ts (filter/option builders)
- ExploreUtils.tsx → ExplorePureUtils.ts (URL parsing, tree/filter utils)
- ClassificationUtils.tsx → ClassificationPureUtils.ts (getDeleteButtonData, getClassificationInfo)
- TagsUtils.tsx → TagsPureUtils.ts (tag creation/query/redirect helpers)
- GlossaryUtils.tsx → GlossaryPureUtils.ts (tree builders, breadcrumbs, validators)
- KnowledgePageUtils.tsx → KnowledgePagePureUtils.ts (page hierarchy/path/tree utils)

Original files retain JSX/singleton functions and re-export all pure symbols for backward compat.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix(ui): import getTermQuery from SearchPureUtils and getQueryFilterToIncludeApprovedTerm from GlossaryPureUtils

TagsPureUtils was importing from SearchUtils.tsx (React/SVG-heavy) and TagsUtils.tsx
from GlossaryUtils instead of their pure counterparts, defeating the purity goal.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
…l etc pure utils (#28740)

* feat(ui): extract EntitySortUtils, EntityPermissionUtils, EntityVoteUtils, EntityTagUtils, EntitySearchUtils, EntityColumnUtils, EntityBreadcrumbPureUtils, EntitySummaryPanelPureUtils from EntityPureUtils/EntityUtils/EntityBreadcrumbUtils/EntitySummaryPanelUtils

- Extract columnSorter/getColumnSorter → EntitySortUtils.ts
- Extract hasSchemaTab/hasLineageTab/hasCustomPropertiesTab/hasEditAccess → EntityPermissionUtils.ts
- Extract getEntityVoteStatus → EntityVoteUtils.ts
- Extract getEntityTags → EntityTagUtils.ts
- Extract searchInColumns/highlightEntityNameAndDescription/highlightSearchText/highlightSearchArrayElement → EntitySearchUtils.tsx
- Extract getEntityReferenceFromEntity/getEntityReferenceListFromEntities → EntityReferenceUtils.ts
- Extract getFrequentlyJoinedColumns → EntityColumnUtils.tsx (new file)
- Move all pure breadcrumb functions → EntityBreadcrumbPureUtils.ts; EntityBreadcrumbUtils.tsx becomes re-export facade
- Extract getSummaryListItemType/getSortedTagsWithHighlight/getMapOfListHighlights/getHighlightOfListItem/toEntityData → EntitySummaryPanelPureUtils.ts
- Extract filterItemsBySearchText/filterNestedFields → EntitySummaryPanelPureUtilsV1.ts (imported instead of redefined)
- Add backward-compat re-exports in all source files so existing imports continue to work

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* feat(ui): extract EntitySortUtils, EntityPermissionUtils, EntityVoteUtils, EntityTagUtils, EntitySearchUtils, EntityDetailComponentUtils, EntityBreadcrumbPureUtils, EntitySummaryPanelPureUtils from EntityPureUtils/EntityUtils/EntityBreadcrumbUtils

Split EntityPureUtils.ts into domain-specific modules:
- EntitySortUtils.ts: columnSorter, getColumnSorter
- EntityPermissionUtils.ts: hasSchemaTab, hasLineageTab, hasCustomPropertiesTab, hasEditAccess
- EntityVoteUtils.ts: getEntityVoteStatus
- EntityTagUtils.ts: getEntityTags
- EntitySearchUtils.tsx: searchInColumns, highlightEntityNameAndDescription, highlightSearchText, highlightSearchArrayElement
- EntityColumnUtils.tsx: checkIfJoinsAvailable, getFrequentlyJoinedWithColumns, getFrequentlyJoinedColumns
- EntityReferenceUtils.ts: getEntityReferenceFromEntity, getEntityReferenceListFromEntities
- EntityDetailComponentUtils.tsx: getEntityDetailComponent
- EntityBreadcrumbPureUtils.ts: pure breadcrumb builders from EntityBreadcrumbUtils.tsx
- EntitySummaryPanelPureUtils.ts: pure summary panel helpers from EntitySummaryPanelUtils.tsx
- EntitySummaryPanelPureUtilsV1.ts: pure v1 summary panel helpers

All source files re-export moved symbols for backward compat.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: remove unused EntityLinkUtils.ts (all exports are duplicates of EntityPureUtils/EntityBreadcrumbPureUtils)

No consumers anywhere in the codebase. 7 of 10 exports already exist in
EntityPureUtils.ts, getEntityLinkFromType already in EntityBreadcrumbPureUtils.ts.
Deleting avoids dual-copy maintenance hazard.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
…tRouter pages (PR #14) (#28797)

Convert 47 eager page/component imports in SettingsRouter.tsx to React.lazy()
+ withSuspenseFallback() so the settings chunk is not part of the main bundle.
Also lazify EntityVersionPage in EntityRouter and BulkEntityImportPage in
EntityImportRouter.

- SettingsRouter.tsx: 47 imports → React.lazy() with webpack chunk splitting
- EntityRouter.tsx: EntityVersionPage → lazy
- EntityImportRouter.tsx: BulkEntityImportPage → lazy
- Named exports use .then((m) => ({ default: m.X })) pattern

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
…28792)

* feat(ui): extract database/schema/table/ingestion tab and config utils (PR #13)

Extract tab components and config utils from large source files into dedicated modules.
Original files re-export all moved symbols for backward compatibility.

New files:
- Database/DatabaseDropdownOptions.tsx (database dropdown option builders)
- Database/DatabaseTabsUtils.tsx (database page tab definitions)
- DatabaseSchemaDropdownOptions.tsx (schema dropdown option builders)
- DatabaseSchemaTabsUtils.tsx (schema page tab definitions)
- TableDropdownOptions.tsx (table dropdown option builders)
- TableTabsUtils.tsx (table page tab definitions)
- IngestionConfigUtils.ts (ingestion configuration pure utils)
- CronExpressionUtils.ts (cron schedule/expression utils)
- DomainFilterUtils.ts (domain filter query builders)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: import getDayCron from CronExpressionUtils instead of SchedularUtils

Removes transitive React/antd dependency from pure util IngestionConfigUtils.ts.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix checkstyle

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
* feat(ui): extract remaining pure utils (PR #12)

Extract pure functions from 12 utility files into dedicated *PureUtils.ts files.
Original files re-export all moved symbols for backward compatibility.

New pure util files:
- AgentsStatusWidgetPureUtils.ts (getAgentLabelFromType, getAgentStatusLabelFromStatus, getAgentStatusSummary)
- Alerts/AlertsUtilPure.ts (20 pure alert helpers)
- BlockEditorPureUtils.ts (pure block editor utils)
- ContainerDetailPureUtils.ts (pure container detail utils)
- ContextCenterPureUtils.ts (pure context center utils)
- CuratedAssetsPureUtils.ts (pure curated assets utils)
- CustomizableLandingPagePureUtils.ts (pure landing page utils)
- CustomizePage/CustomizePagePureUtils.ts (pure customize page utils)
- DataAssetSummaryPanelPureUtils.ts (pure data asset summary utils)
- CSV/CSVPureUtils.ts (pure CSV processing utils)
- Lineage/LineagePureUtils.ts (pure lineage utils)
- MetricEntityUtils/MetricPureUtils.ts (pure metric utils)
- UsersPureUtils.ts (pure user utils)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix checkstyle

* fix: drop dead duplicate code from BlockEditorPureUtils

Remove isHTMLString, _convertMarkdownFormatToHtmlString, formatContentForClient
from BlockEditorPureUtils.ts — all three are duplicates of code in BlockEditorUtils.ts,
none were re-exported or consumed anywhere. Pure file now contains only
isDescriptionContentEmpty and getTextFromHtmlString.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix(test): update DataAssetSummaryPanelUtils test to mock TablePureUtils

getTierTags moved to TablePureUtils.ts; test was mocking TableUtils (old path)
causing the mock to be ignored and the assertion to fail.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
@shah-harshit
shah-harshit force-pushed the ui/backport-group3-utility-splits-1.13 branch from f7cfcd5 to 27dc6d2 Compare July 14, 2026 16:33
@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (13 flaky)

✅ 3965 passed · ❌ 0 failed · 🟡 13 flaky · ⏭️ 30 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 291 0 0 4
✅ Shard 2 0 0 0 0
🟡 Shard 3 735 0 2 7
🟡 Shard 4 779 0 3 2
🟡 Shard 5 753 0 4 9
✅ Shard 6 693 0 0 0
🟡 Shard 7 714 0 4 8
🟡 13 flaky test(s) (passed on retry)
  • Features/BulkEditEntity.spec.ts › Database Schema (shard 3, 1 retry)
  • Features/ColumnBulkOperations.spec.ts › should load the page with stats cards and grid data (shard 3, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 4, 1 retry)
  • Flow/AddRoleAndAssignToUser.spec.ts › Verify assigned role to new user (shard 4, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Markdown (shard 5, 1 retry)
  • Pages/CustomProperties.spec.ts › Email (shard 5, 1 retry)
  • Pages/CustomProperties.spec.ts › Should clear search and show all properties for dataProduct in right panel (shard 5, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with deeply nested subdomains (3+ levels) verifies FQN propagation (shard 5, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 7, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 7, 1 retry)
  • Pages/TestSuite.spec.ts › Logical TestSuite (shard 7, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 7, 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

@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
64.03% (61825/96548) 44.59% (33237/74529) 47.6% (10238/21505)

@sonarqubecloud

Copy link
Copy Markdown

@shah-harshit
shah-harshit merged commit 5cbc5f9 into 1.13 Jul 15, 2026
51 of 54 checks passed
@shah-harshit
shah-harshit deleted the ui/backport-group3-utility-splits-1.13 branch July 15, 2026 08:32
@gitar-bot

gitar-bot Bot commented Jul 15, 2026

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

Backports UI utility extractions and implements lazy-loading for router components to 1.13, ensuring glossary approval task threads are correctly preserved. No issues found.

✅ 1 resolved
✅ Bug: Approve/reject permission logic changed for reviewers

📄 openmetadata-ui/src/main/resources/ui/src/utils/GlossaryPureUtils.ts:344-358
The old logic gated permission on assignees: when the task had assignees, only an assignee could approve/reject (hasTaskAssignees ? isTaskAssignee : (isTaskAssignee || isReviewer)). The new logic is Boolean(taskThread && (isTaskAssignee || isReviewer)), so a term reviewer who is NOT a task assignee now gains approve/reject permission even when explicit assignees exist — an authorization expansion. If this alignment with OSS main is intentional, confirm it is the desired behavior; otherwise restore the assignee-priority branch.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

This branch was previously deployed

1 inactive deployment
test — abaa532e Deployed Jul 15, 2026 by shah-harshit via playwright-knowledge-graph-postgresql #805
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.

1 participant