perf(ui): split task and data quality utilities#29181
Conversation
Code Review ✅ Approved 1 resolved / 1 findingsRefactors monolithic task utilities into six focused modules to optimize UI loading, while resolving the build error caused by an incorrect import in FailedTestCaseSampleData.component.tsx. ✅ 1 resolved✅ Bug: Import from non-existent module EntityDisplayPureUtils
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Summary
Testing
Ref: https://github.com/open-metadata/openmetadata-collate/issues/4230
Greptile Summary
This PR splits the monolithic
TasksUtils.ts(~1320 lines) into six focused utility modules —TaskActionUtils,TaskAssigneeUtils,TaskEntityFetchUtils,TaskFieldUtils,TaskNavigationUtils, andTaskPayloadUtils— so task and incident flows can load only the helpers they need. The originalTasksUtils.tsis retained as a barrel re-exporter, preserving backward compatibility for existing consumers.TasksUtils.tsnow re-exports from all six sub-modules; callers that still import fromTasksUtilscontinue to work without changes.RequestDescriptionPage,UpdateDescriptionPage,RequestTagPage,UpdateTagPage, shared components) and data-quality components (IncidentManagerPageHeader,TestCaseStatusModal,SqlQueryTab) are updated to import directly from the new focused modules.SqlQueryTablazily loadsQueryViewerandAddSqlQueryFormModalviawithSuspenseFallback, andContractSemanticFormTabgains the required CSS side-effect import for@react-awesome-query-builder/antd.Confidence Score: 5/5
Safe to merge — this is a pure module-split refactoring with no behavioral changes and a barrel re-export that keeps all existing import paths working.
Every function previously in TasksUtils.ts is accounted for in one of the six new modules and is re-exported from the barrel. Consumer files updated in this PR import from the correct focused modules, and the remaining consumers that still point at TasksUtils continue to receive the same exports through the barrel. No logic was changed, only code organization.
No files require special attention. Test updates in TaskTabNew.component.test.tsx involve redundant double-mocking of isRecognizerFeedbackTask across both TasksUtils and TaskActionUtils, but this is harmless given the barrel re-export relationship.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD TU["TasksUtils.ts\n(barrel re-export)"] TU --> TAU["TaskActionUtils.ts\nAction constants, type predicates\nisDarApprovalActive, isRecognizerFeedbackTask"] TU --> TASU["TaskAssigneeUtils.ts\nfetchOptions, generateOptions"] TU --> TEFU["TaskEntityFetchUtils.ts\nfetchEntityDetail, getBreadCrumbList"] TU --> TFU["TaskFieldUtils.ts\nColumn/field path helpers\ngetTaskMessage, getTaskAssignee"] TU --> TNU["TaskNavigationUtils.ts\nRoute path builders\ngetTaskDetailPath, getTaskDisplayId"] TU --> TPU["TaskPayloadUtils.ts\ngetDescriptionDiff\ngetNormalizedTaskPayload"] RDP["RequestDescriptionPage"] --> TASU RDP --> TEFU RDP --> TFU UDP["UpdateDescriptionPage"] --> TASU UDP --> TEFU UDP --> TFU RTP["RequestTagPage"] --> TASU RTP --> TEFU RTP --> TFU UTP["UpdateTagPage"] --> TASU UTP --> TEFU UTP --> TFU ET["EntityTasks"] --> TFU ET --> TNU IH["IncidentManagerPageHeader"] --> TNU TC["TestCaseStatusModal"] --> TASU LEGACY["Existing consumers\n(ActivityFeed, Glossary, Tags…)"] --> TU%%{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 TU["TasksUtils.ts\n(barrel re-export)"] TU --> TAU["TaskActionUtils.ts\nAction constants, type predicates\nisDarApprovalActive, isRecognizerFeedbackTask"] TU --> TASU["TaskAssigneeUtils.ts\nfetchOptions, generateOptions"] TU --> TEFU["TaskEntityFetchUtils.ts\nfetchEntityDetail, getBreadCrumbList"] TU --> TFU["TaskFieldUtils.ts\nColumn/field path helpers\ngetTaskMessage, getTaskAssignee"] TU --> TNU["TaskNavigationUtils.ts\nRoute path builders\ngetTaskDetailPath, getTaskDisplayId"] TU --> TPU["TaskPayloadUtils.ts\ngetDescriptionDiff\ngetNormalizedTaskPayload"] RDP["RequestDescriptionPage"] --> TASU RDP --> TEFU RDP --> TFU UDP["UpdateDescriptionPage"] --> TASU UDP --> TEFU UDP --> TFU RTP["RequestTagPage"] --> TASU RTP --> TEFU RTP --> TFU UTP["UpdateTagPage"] --> TASU UTP --> TEFU UTP --> TFU ET["EntityTasks"] --> TFU ET --> TNU IH["IncidentManagerPageHeader"] --> TNU TC["TestCaseStatusModal"] --> TASU LEGACY["Existing consumers\n(ActivityFeed, Glossary, Tags…)"] --> TUReviews (2): Last reviewed commit: "fix(ui): resolve tasks data quality lazy..." | Re-trigger Greptile