Skip to content

feat(ui): extract FeedUtilsPure from FeedUtils - #28672

Merged
shah-harshit merged 2 commits into
mainfrom
feat/extract-feed-utils-pure
Jun 4, 2026
Merged

shah-harshit merged 2 commits into
mainfrom
feat/extract-feed-utils-pure

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Extract 31 non-JSX functions from FeedUtils.tsx into new FeedUtilsPure.ts (entity link helpers, feed formatting, mention/hashtag parsing, thread CRUD, feed counts)
  • FeedUtils.tsx re-exports all moved symbols for backward compatibility — no consumer changes needed
  • Remaining in FeedUtils.tsx: JSX renderers (getEntityFieldDisplay, getFieldOperationIcon, getTestCaseResultCount, getFeedHeaderTextFromCardStyle, getActivityEventHeaderText), suggestions, userMentionItemWithAvatar

Test plan

  • npx tsc --noEmit passes (verified locally, 0 new errors)
  • Existing feed/activity tests pass unchanged (re-exports maintain import paths)
  • UI checkstyle passes

Ref: https://github.com/open-metadata/openmetadata-collate/issues/4230

🤖 Generated with Claude Code

Move 31 non-JSX functions from FeedUtils.tsx to FeedUtilsPure.ts.
FeedUtils.tsx re-exports all moved symbols for backward compatibility.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@shah-harshit
shah-harshit requested a review from a team as a code owner June 3, 2026 15:46
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@shah-harshit shah-harshit self-assigned this Jun 3, 2026
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.33% (67059/105876) 44.22% (36886/83402) 46.43% (10938/23556)

@sonarqubecloud

sonarqubecloud Bot commented Jun 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (18 flaky)

✅ 4255 passed · ❌ 0 failed · 🟡 18 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 297 0 2 4
🟡 Shard 2 799 0 4 9
🟡 Shard 3 802 0 2 8
🟡 Shard 4 850 0 4 12
🟡 Shard 5 718 0 2 47
🟡 Shard 6 789 0 4 8
🟡 18 flaky test(s) (passed on retry)
  • Features/MetricCustomUnitFlow.spec.ts › Should create metric and test unit of measurement updates (shard 1, 1 retry)
  • Pages/AuditLogs.spec.ts › should apply both User and EntityType filters simultaneously (shard 1, 1 retry)
  • Features/DataQuality/ColumnLevelTests.spec.ts › Column Values To Be Unique (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with only VIEW cannot PATCH results (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should display correct status badge color and icon (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 2 retries)
  • Features/Table.spec.ts › Table pagination with sorting should works (shard 3, 1 retry)
  • Flow/ServiceForm.spec.ts › Verify form selects are working properly (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Set & Update all CP types on databaseSchema (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Timestamp (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Entity Reference List (shard 4, 1 retry)
  • Pages/Entity.spec.ts › User as Owner Add, Update and Remove (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Glossary Bulk Import Export (shard 6, 1 retry)
  • Pages/InputOutputPorts.spec.ts › Lineage section collapse/expand (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Create team with domain and verify visibility of inherited domain in user profile after team removal (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 22ac4a7 into main Jun 4, 2026
49 checks passed
@shah-harshit
shah-harshit deleted the feat/extract-feed-utils-pure branch June 4, 2026 05:45
@gitar-bot

gitar-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Extracts 31 non-JSX functions from FeedUtils into FeedUtilsPure to improve modularity. No issues found, and backward compatibility is maintained via re-exports.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

shah-harshit added a commit that referenced this pull request Jul 14, 2026
* feat(ui): extract FeedUtilsPure from FeedUtils (#28672)

* feat(ui): extract FeedUtilsPure from FeedUtils

Move 31 non-JSX functions from FeedUtils.tsx to FeedUtilsPure.ts.
FeedUtils.tsx re-exports all moved symbols for backward compatibility.

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

* fix checkstyle

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>

* feat(ui): extract TablePureUtils and TagsPureUtils (#28673)

* feat(ui): extract TablePureUtils and TagsPureUtils

Move 43 pure functions from TableUtils.tsx to TablePureUtils.ts and
5 functions from TagsUtils.tsx to TagsPureUtils.ts. Both original files
re-export all moved symbols for backward compatibility.

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

* fix checkstyle

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>

* feat(ui): extract DataProductPureUtils, DataInsightPureUtils, DataQualityPureUtils (#28701)

* feat(ui): extract DataProductPureUtils, DataInsightPureUtils, DataQualityPureUtils

Move pure (no-JSX, no-API, no-singleton) functions from DataProductUtils.tsx,
DataInsightUtils.tsx, and DataQualityUtils.tsx into dedicated *PureUtils.ts files.
Originals re-export all moved symbols for backward compat.

- DataProductPureUtils.ts: convertDataProductsToEntityReferences,
  convertEntityReferencesToDataProducts, getQueryFilterForDataProductPorts
- DataInsightPureUtils.ts: getEntryFormattedValue, getGraphDataByEntityType,
  getFormattedActiveUsersData, getDisabledDates, getDataInsightPathWithFqn,
  getOptionalDataInsightTabFlag, sortEntityByValue, getRandomHexColor,
  isPercentageSystemGraph, getQueryFilterForDataInsightChart (+ 3 private helpers)
- DataQualityPureUtils.ts: 27 symbols including buildTestCaseParams,
  createUpdatedTestCasePatch, buildDataQualityDashboardFilters, getDimensionIcon,
  calculateTestCaseStatusCounts, transformToTestCaseStatusByDimension, etc.

All type-only imports use import type. 78 existing tests still pass.

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

* chore(ui): apply prettier formatting to PR7 pure utils files

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

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>

* feat(ui): extract pure service utils and widget components (#28692)

* feat(ui): extract pure service utils and widget components

Extract 26 pure functions from ServiceUtils.tsx, ServiceInsightsTabUtils.tsx,
and DatabaseServiceUtils.tsx into dedicated pure util modules. Promote
getServiceInsightsWidgetPlaceholder to standalone component file. All original
files re-export moved symbols for backward compatibility.

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

* Fix checkstyle

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>

* feat(ui): extract EntityVersion/Diff pure utils and lazy-load version components (#28687)

* feat(ui): extract EntityVersion/Diff pure utils and lazy-load version components

Split monolithic EntityVersionUtils.tsx (~1420 lines) into focused modules:
- EntityDiffPureUtils.ts: pure diff accessor functions (no React deps)
- EntityDiffUtils.tsx: JSX diff rendering functions
- EntityVersionUtilsPure.ts: pure version processing logic
- EntityVersionClassBase.ts: lazy-load registry for version components
EntityVersionUtils.tsx re-exports all symbols for backward compatibility.
EntityVersionPage now uses lazy-loaded components via EntityVersionClassBase.

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

* fix(ui): replace ComponentType<any> with typed VersionComponentType in EntityVersionClassBase

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

* fix checkstyle

* fix(pr5): convert type-only imports to import type across all changed files

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

* fix checkstyle

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>

* fix(ui): adapt feed utils backport to 1.13 APIs

* fix(ui): preserve 1.13 utility contracts

* fix(ui): align feed utils test mock with split helper

* fix(ui): scope feed count helpers for 1.13

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>

This branch was previously deployed

1 inactive deployment
test — 4228e90d Deployed Jun 3, 2026 by shah-harshit via playwright-ci-postgresql (3, 6) #49607
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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants