Repository navigation
refactor(ui): consolidate destination form - #32078
Conversation
✅ Playwright Results — workflow succeededValidated commit ✅ 818 passed · ❌ 0 failed · 🟡 3 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 54m 9s ⏱️ Max setup 4m 27s · max shard execution 17m 34s · max shard-job elapsed before upload 20m 42s · reporting 6s 🌐 215.29 requests/attempt · 2.60 app boots/UI scenario · 16.60% common-shard skew Optimization targets still in progress:
🟡 3 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
c148202 to
74c68bb
Compare
|
| Count | Rule |
|---|---|
| 19 | sonarjs/no-duplicate-string |
| 16 | react-hooks/exhaustive-deps |
| 5 | openmetadata-imports/no-lower-layer-page-imports |
| 5 | sonarjs/cyclomatic-complexity |
| 1 | sonarjs/expression-complexity |
| 1 | sonarjs/no-nested-conditional |
| 1 | openmetadata-imports/no-cross-page-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:31:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:112:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:143:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'getResourcePermission' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:149:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchTemplates'. Either include it or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:153:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchFunctions'. Either include it or remove the dependency array. Outer scope values like 'Fqn' aren't valid de |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationFormItem.component.tsx:35:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationFormItem.component.tsx:73:9 |
react-hooks/exhaustive-deps |
The 'destinations' logical expression could make the dependencies of useMemo Hook (at line 95) change on every render. To fix this, wrap the initialization of ' |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationFormItem.component.tsx:73:9 |
react-hooks/exhaustive-deps |
The 'destinations' logical expression could make the dependencies of useCallback Hook (at line 155) change on every render. To fix this, wrap the initialization |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationFormItem.component.tsx:84:20 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationFormItem.component.tsx:171:55 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 4 times. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationFormItemFormBridge.tsx:19:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationConfigField/DestinationConfigField.tsx:98:9 |
react-hooks/exhaustive-deps |
The 'receivers' logical expression could make the dependencies of useCallback Hook (at line 124) change on every render. To fix this, wrap the initialization of |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationConfigField/DestinationConfigField.tsx:98:9 |
react-hooks/exhaustive-deps |
The 'receivers' logical expression could make the dependencies of useCallback Hook (at line 134) change on every render. To fix this, wrap the initialization of |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationConfigField/DestinationConfigField.tsx:252:29 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 9 times. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationConfigField/DestinationConfigField.tsx:405:43 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationConfigField/DestinationConfigField.tsx:462:45 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationConfigField/DestinationConfigField.tsx:488:45 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationSelectItem.tsx:46:10 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 24 which is greater than 10 authorized.","cost":14,"secondaryLocations":[{"line":46,"column":9,"endLine":46,"endColumn" |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationSelectItem.tsx:59:9 |
react-hooks/exhaustive-deps |
The 'destinationItem' logical expression could make the dependencies of useMemo Hook (at line 98) change on every render. To fix this, wrap the initialization o |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationSelectItem.tsx:174:32 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationSelectItem.tsx:205:29 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationSelectItem.tsx:223:12 |
sonarjs/expression-complexity |
Reduce the number of conditional operators (7) used in the expression (maximum allowed 3). |
| 🟡 | src/components/Alerts/DestinationFormItem/DestinationSelectItem/DestinationSelectItem.tsx:340:32 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/components/Alerts/DestinationFormItem/TeamAndUserSelectItem/TeamAndUserSelectItem.tsx:47:9 |
react-hooks/exhaustive-deps |
The 'selectedOptions' logical expression could make the dependencies of useCallback Hook (at line 78) change on every render. To fix this, wrap the initializati |
| 🟡 | src/components/Alerts/DestinationFormItem/TeamAndUserSelectItem/TeamAndUserSelectItem.tsx:47:9 |
react-hooks/exhaustive-deps |
The 'selectedOptions' logical expression could make the dependencies of useCallback Hook (at line 89) change on every render. To fix this, wrap the initializati |
| 🟡 | src/components/Alerts/DestinationFormItem/TeamAndUserSelectItem/TeamAndUserSelectItem.tsx:221:17 |
sonarjs/no-nested-conditional |
Extract this nested ternary operation into an independent statement. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:89:1 |
openmetadata-imports/no-cross-page-imports |
Page features must not import another page feature. Move shared code to components, hooks, interfaces, or pure utilities. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:95:32 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 11 which is greater than 10 authorized.","cost":1,"secondaryLocations":[{"line":95,"column":31,"endLine":95,"endColumn" |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:144:48 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 4 times. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:149:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:164:11 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:194:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'fetchAlert' and 'fetchFunctions'. Either include them or remove the dependency array. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:222:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'getResourceLimit' and 'setInlineAlertDetails'. Either include them or remove the dependency array. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:293:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'getResourcePermission' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/pages/AddNotificationPage/AddNotificationPage.tsx:299:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchTemplates'. Either include it or remove the dependency array. |
| 🟡 | src/utils/Alerts/AlertsUtil.test.tsx:38:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/Alerts/AlertsUtil.tsx:154:9 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/utils/Alerts/AlertsUtil.tsx:271:3 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 18 which is greater than 10 authorized.","cost":8,"secondaryLocations":[{"line":271,"column":2,"endLine":271,"endColumn |
| 🟡 | src/utils/Alerts/AlertsUtil.tsx:346:26 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 9 times. |
| 🟡 | src/utils/Alerts/AlertsUtil.tsx:484:26 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 5 times. |
| 🟡 | src/utils/Alerts/AlertsUtil.tsx:707:21 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/utils/Alerts/AlertsUtilPure.ts:37:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/Alerts/AlertsUtilPure.ts:40:62 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 11 which is greater than 10 authorized.","cost":1,"secondaryLocations":[{"line":40,"column":61,"endLine":40,"endColumn" |
| 🟡 | src/utils/Alerts/AlertsUtilPure.ts:57:16 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 3 times. |
| 🟡 | src/utils/Alerts/AlertsUtilPure.ts:441:66 |
sonarjs/cyclomatic-complexity |
{"message":"Function has a complexity of 16 which is greater than 10 authorized.","cost":6,"secondaryLocations":[{"line":441,"column":65,"endLine":441,"endColum |
| 🟡 | src/utils/Alerts/AlertsUtilPure.ts:444:16 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 13 times. |
| 🟡 | src/utils/Alerts/AlertsUtilPure.ts:445:22 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 13 times. |
| 🟡 | src/utils/Alerts/AlertsUtilPure.ts:458:21 |
sonarjs/no-duplicate-string |
Define a constant instead of duplicating this literal 5 times. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
shah-harshit
left a comment
There was a problem hiding this comment.
Review focused on behavior parity for the destination-form consolidation.
Framing correction that affects how to read the diff: at the merge base, DestinationFormItemV2 was never wired into any page — only its own tests imported it. All three live callers (AddNotificationPage, ObservabilityAlertFormFields, AlertConfigDetails) rendered the legacy Ant DestinationFormItem. So the real user-facing baseline is the legacy Ant component, and the new core-UI component is essentially V2's body driven through the new DestinationFormItemFormBridge. Parity should be judged against legacy, not V2.
Verdict: build is safe — every removed helper (getConnectionTimeoutField, getReadTimeoutField, getDestinationConfigField, old getTeamOptions) is dead with no dangling refs; the deleted TeamAndUserSelectItem.constants.ts was inlined into its test; no V2 imports remain. Source-aware filtering, internal/external handling, G Chat/Ms Teams labels, webhook auth/headers/query-params/HTTP-method, secret redaction, timeout defaults, test-destination, and read-only pass-through are all preserved. The two-way Ant↔RHF sync in the bridge is guarded against loops/echo and I found no concrete drop-of-edits bug.
The inline comments below are the handful of genuine behavior deltas vs the legacy component (several look like intended fixes, but they are not no-ops, so calling this a 'pure consolidation' is slightly overstated) plus one small regression and one manual-test hotspot. No blockers.
Code Review ✅ Approved 3 resolved / 3 findingsConsolidates destination form by promoting the core-UI component to the canonical path, migrating notification/observability/alert-details flows through a compatibility bridge, and removing duplicate V2 tree and legacy Ant Design UI. Resolves stale validation errors from setValue without shouldValidate, KeyValueList test-id collisions across destinations, and unnecessary bridge re-subscriptions on each render. All validation, filtering, auth configuration, and read-only behavior preserved; focused Jest, Playwright, and type-check tests passed. ✅ 3 resolved✅ Bug: setValue without shouldValidate leaves stale validation errors
✅ Quality: KeyValueList test-ids/labels collide across multiple destinations
✅ Performance: Bridge re-subscribes watch and re-checks reset every render
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



What changed
DestinationFormItempath.G Chat/Ms Teamslabels.Screen.Recording.2026-09-02.at.2.16.23.PM.mov
Validation
testResult.configinstead of a redacted response.git diff --checkpassed.yarn tsc:checkreported no errors in the changed destination or alert files; the branch retains unrelated pre-existing type errors elsewhere in the UI.Related to #6030. Collate companion: open-metadata/openmetadata-collate#6146.