feat(ui): Wave 0 foundations for AntD → ui-core-components migration - #30560
feat(ui): Wave 0 foundations for AntD → ui-core-components migration#30560chirag-madlani wants to merge 18 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sform Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
✅ Playwright Results — workflow succeededValidated commit ✅ 537 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 5 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) 48m 5s ⏱️ Max setup 2m 54s · max shard execution 14m 21s · max shard-job elapsed before upload 17m 23s · reporting 4s 🌐 203.01 requests/attempt · 2.86 app boots/UI scenario · 18.58% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
playwright/e2e/VisualRegression/*.spec.ts is testIgnore'd by the chromium project (it runs under its own playwright-visual.yml workflow), but select_playwright_tests.py still emitted a selector for changed files under that directory. build_playwright_shards.py then rejected the plan because the selector matched no runnable chromium test, crashing "plan-playwright" for any PR touching the visual suite. Add playwright/e2e/VisualRegression/** to impact-map.json's delegatedSpecs, the existing mechanism used for other dedicated-workflow suites (Auth, nightly, Http2, RDF specs), so changed visual-regression specs are routed to delegatedChangedSpecs instead of selectors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reformat entityDetails.spec.ts to satisfy Prettier's line-length rule (the UI Checkstyle job runs organize-imports-cli + eslint --fix + prettier --write on changed playwright files and fails the PR if that leaves a diff). Ran the same organize-imports/eslint/prettier chain scoped to the four new visual-regression files; only this file needed a change, and eslint + prettier --check are now clean on all of them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…mports
parseAntdImports' named-import regex required `{` immediately after
import/type, so `import Button, { Divider } from 'antd';` contributed
nothing to the sweep ledger — silently undercounting any file that
mixes a default and named antd import on one line. Allow an optional
default binding before the braces.
Verified the change is a no-op on the current LEDGER.md: running
ledger.mjs against openmetadata-ui/src/main/resources/ui before and
after the regex change produces byte-identical output (0 files in
this repo currently use the combined default+named import shape).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ting import When every specifier moves out of an antd import AND a target import already exists, move-named-imports.js called `j(path).remove()` on the antd import node, discarding its comments outright. If that import was the file's first statement, its license header vanished from the output. Re-attach any leading comments to the node that becomes the program's new first statement after removal (prepending them ahead of whatever comments that node already carries). Added a regression test with a license header above a first-statement antd import merging into an already-imported target; it fails against the old code (header dropped) and passes with the fix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| function importKindOf(node) { | ||
| return node.importKind === 'type' ? 'type' : 'value'; | ||
| } |
There was a problem hiding this comment.
Inline type imports become values
When a selected symbol uses mixed-import syntax such as import { Button, type TabsProps } from 'antd', importKindOf classifies the entire declaration as a value import and the value pass moves TabsProps accordingly. The destination then requests a runtime value for a type-only export, causing TypeScript compilation or module-loading failures.
Context Used: CLAUDE.md (source)
…riance The landing dashboard's async widgets and version toast settle slightly differently per CI run, hovering around the default 1% gate (1.06% on a run following two green ones, with the internal 27%->2% retry progression showing late-loading widget content). 3% absorbs the cross-run variance without changing the rendered expectation, so the existing baseline stays valid. Proper masking of the volatile widgets happens when the landing page is reworked in its migration sweep. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Code Review ✅ Approved 2 resolved / 2 findingsEstablishes Wave 0 foundations for the AntD to ui-core-components migration with documentation, a named-import codemod, import ledger, and a Playwright visual-regression test harness. No issues found. ✅ 2 resolved✅ Edge Case: Ledger undercounts combined default+named antd imports
✅ Edge Case: Codemod drops license header on full-move into existing import
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
|



Summary
Foundations for the AntD →
@openmetadata/ui-core-componentsmigration program (Wave 0). No product code changes — tooling, docs, test harness, and CI only.docs/antd-migration/— sweep playbook README + mapping-guide template (the review contract for every future component sweep)tooling/antd-codemods/— jscodeshift scaffold with a genericmove-named-importstransform (6 inline tests: partial move, full-move removal, alias preservation, merge into existing import, no-op, license-header retention)tooling/antd-migration/ledger.mjs— sweep-ledger generator counting antd imports per component per repo plus.ant-*selector occurrences (5 node:test cases; skips vendored/generated dirs; QueryBuilder files excluded as owned by feat(query-builder): migrate QueryBuilderWidgetV1 from antd to core-components #29849)visual-regressionPlaywright project (separate from e2e; chromium project ignores it), determinism helper (fixed clock before navigation, animation freeze, shared screenshot opts), and 16 committed baselines: 13 static pages (incl. collapsed-sidebar variant), table entity details (API-provisioned fixture, name masks), RJSF connector config form, delete-confirmation modal.github/workflows/playwright-visual.yml— PR gate foropenmetadata-ui/**running the visual suite insidemcr.microsoft.com/playwright:v1.57.0-jammy(same image the baselines were generated in, for font-rendering parity), with disk-space reclaim and failure-artifact uploadVerification
tooling/antd-codemods:yarn test6/6 ·tooling/antd-migration:node --test5/5 · eslint/prettier clean on all new spec files ·actionlintclean on the workflow.docs/antd-migration/dead-code-seed.json, 8 files / 451 issues): 3 entries grep-spot-checked, 0 false positives (e.g.DataAssetsHeaderExtraInfohas zero importers). Seed is advisory — deletions must be re-proven in the deleting PR.Notes for reviewers
--update-snapshotspass regenerates baselines.🤖 Generated with Claude Code
Fixes #30564 (Wave 0 of epic #30570)
Greptile Summary
The PR establishes the first migration-wave infrastructure:
Confidence Score: 4/5
The PR is not yet safe to merge because the codemod still converts inline type-only specifiers in mixed imports into runtime value imports.
A mixed declaration such as
import { Button, type TabsProps } from 'antd'is classified by declaration kind as a value import, while the move loop ignores the selected specifier's own type kind; generated migrations can therefore fail TypeScript compilation or request a nonexistent runtime export.Files Needing Attention: tooling/antd-codemods/transforms/move-named-imports.js; tooling/antd-codemods/tests/move-named-imports.test.js
Important Files Changed
Reviews (5): Last reviewed commit: "test(ui): widen landing-page diff tolera..." | Re-trigger Greptile