Skip to content

Fixes #34738: Support DataAssetList with AutoComplete like component - #34739

Merged
chirag-madlani merged 29 commits into
mainfrom
unify-data-asset-list
Oct 13, 2026
Merged

chirag-madlani merged 29 commits into
mainfrom
unify-data-asset-list

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #34738

Two related changes:

  1. One data asset dropdown. DataAssetAsyncSelectList (autocomplete-style select control) and DataAssetSelectList (trigger-based picker) rendered their dropdowns independently, so the same data asset search looked different depending on the control. The autocomplete control now reuses the picker's dropdown pieces (asset rows, "Showing X of Y" count bar, keyboard-hint footer, loading row) while keeping its select-control behaviour (inline input, chips, single/multiple selection).
  2. Legacy FormBuilder removed. The remaining users of the antd FormBuilder and its JSON-schema widgets (SelectWidget, AsyncSelectWidget, TreeSelectWidget, PasswordWidget) move to FormBuilderV1: application configuration, MCP application configuration, the read-only run config in app run history, and the SSO configuration form's enum selects. FormBuilderV1 gains what those forms relied on.

Merge order: open-metadata/openmetadata-collate#7265 moves CollateAppConfiguration off FormBuilder and must merge first; maven-collate-ci fails on this PR until it does.

Type of change:

  • Improvement

High-level design:

Data asset dropdown

  • Core Autocomplete gains optional popoverHeader, popoverFooter and emptyState props. With a header or footer the popover becomes a flex column: header and footer stay pinned and the list gets its own scroller, which still drives onPopoverScroll paging. Existing callers pass none of them and render unchanged (virtualized lists included).
  • Shared picker pieces: DataAssetPickerCountBar, DataAssetPickerFooter and DataAssetPickerLoading are extracted from DataAssetPickerShell; the shell composes them, so DataAssetSelectList renders as before.
  • DataAssetAsyncSelectList renders DataAssetPickerRow for entity options (user and team options keep their avatar row) and passes the count bar and footer through the new slots. While a search runs the list is replaced by the loading row, as the picker shell does, instead of leaving the previous query's results looking current.
  • No empty-state flash on open: useAsyncDataAssetOptions keeps the current options while a search loads and skips a query it already shows (same index and filter).
  • DataAssetPickerRow highlights react-aria's own focus state (needed inside a combobox) and carries data-testid="option-<fqn>".

FormBuilderV1 parity with the legacy builder

  • treeSelect fields: rendered by FormBuilderV1's CoreEnumMultiSelectField (added on main in feat(ui): Add Applications to the profile settings modal (core-ui) #35179), which this PR relies on rather than adding its own tree widget. Moving the app configs onto FormBuilderV1 is what puts the SearchIndexing, DataInsights, RdfIndex and CacheWarmup entity pickers on it.

  • Field ids: CoreSelectWidget puts the RJSF field id on the select trigger and CoreBooleanField on the switch input, so <label for> and #root/<field> locators resolve as they did with the antd widgets. Select options carry data-testid="select-option-<value>" again.

  • Doc panel focus: custom fields (toggles, tag arrays) report focus through formContext.handleFocus; FormBuilderV1 now forwards a form-level onFocus there when the caller sets no handleFocus, so the app config doc panel follows booleans and arrays again. Callers that pass their own formContext.handleFocus keep it.

  • validator prop: defaults to the stock ajv8 validator, so callers with other JSON Schema drafts can pass their own.

  • SSO form: SSOFieldTemplate already draws the label, description and errors, so the SSO form wraps CoreSelectWidget to render only the control.

  • Alternatives considered: turning the picker shell into a select control (would duplicate Autocomplete's input/focus/keyboard handling and lose chips/multi-select); keeping the legacy antd widgets alongside FormBuilderV1 (two form stacks to maintain, and antd is deprecated for new work).

  • No schema, API or migration impact.

Tests:

Use cases covered

  • Async data asset select shows the picker-style rows, the count bar and the keyboard-hints footer; paging on scroll still loads the next page
  • A new search replaces the previous results with the loading row; reopening the dropdown does not search again or flash an empty list
  • Single and multiple selection, clearing chips, filtered FQNs and user/team avatar rows behave as before; the picker renders unchanged
  • App config treeSelect fields render as the "All"-aware enum multi-select; picking a specific entity replaces "All"
  • App config toggles and enum selects keep their field ids; the doc panel highlights toggles and array fields on focus
  • SSO enum selects show the field template's label once and keep their field id

Unit tests

  • Core (vitest): autocomplete.test.tsx — popover header/footer and empty-state tests
  • UI (Jest), new or extended: DataAssetAsyncSelectList.test.tsx (count bar, footer, loading row replaces stale results), useAsyncDataAssetOptions.test.ts, CoreBooleanField.test.tsx (field id on the real switch), FormBuilderV1.test.tsx (focus forwarding), SSOConfigurationForm.test.tsx (single label, field id on the select trigger)
  • Suites run: DataAssets 21 suites / 331 tests; FormBuilderV1, Settings, SSO and profile SSO 108 suites / 1020 tests — all pass

Backend integration tests

  • Not applicable (no backend changes)

Ingestion integration tests

  • Not applicable (no ingestion changes)

Playwright (UI) tests

Local Playwright run: PASSED — impact-mapped specs, commit ddab722c507, 2 workers, local stack (2.0.0-SNAPSHOT).

Re-validated on d27a5ff2745 after #35179 landed on main (local stack, 2 workers): SearchIndexApplication 1/1 (entities is now the enum multi-select), DataInsightSettings 3/3 (backfill dates are now core date pickers), DataInsightReportApplication 4/4. Specs touched by later main merges (#34847 SSO, #35234 Context Center): SSOConfiguration + ProfileSsoSettings + ContextCenterMemories 104/106 in one run; the two ContextCenterMemories misses (author-filter option not yet indexed, linked-asset retry loop timing out under 2-worker load) passed 3/3 each when re-run in isolation.

Specs were chosen by tracing each changed component to the UI that renders it, not the planner's full list (its canary/smoke sets and the broad FormBuilderV1 mapping run in the merge queue anyway).

Spec Exercises Passed Failed
Pages/SearchIndexApplication.spec.ts app config: treeSelect entities picker, enum select 1 0
Pages/DataInsightReportApplication.spec.ts app config on FormBuilderV1 (boolean toggles) 4 0
Pages/DataInsightSettings.spec.ts app install + backfill toggle 3 0
Pages/AppRunsHistoryLogs.spec.ts read-only run config (AppRunsHistory) 1 0
Pages/AppStopRunModal.spec.ts app runs history 3 0
Features/SSOConfiguration.spec.ts SSO enum selects (SsoSelectWidget, field id) 40 0
Features/ProfileSsoSettings.spec.ts profile SSO form on FormBuilderV1 4 0
Features/ContextCenterMemories.spec.ts DataAssetSelectList filter + memory modal picker 55 0
Features/ContextCenterPermission.spec.ts related data assets (DataAssetAsyncSelectList) 34 0
Flow/ServiceDocPanel.spec.ts connection form selects + doc panel focus 14 0
Features/DataQuality/ProfilerIngestionForm.spec.ts ¹ ingestion form selects (CoreSelectWidget) 7 0
Features/StorageMetadataAgentForm.spec.ts ¹ ingestion agent forms 5 0
Flow/ServiceForm.spec.ts ¹ service connection form selects 9 0 ²

¹ The local stack has no Argo, so the server reports the pipeline service as unavailable and the UI disables "add ingestion" / Test Connection. These specs ran with only GET /api/v1/services/ingestionPipelines/status answered as healthy by a local proxy; every other request hit the real server. They cover the forms (render, validate, submit payloads), not pipeline execution — the merge queue runs them against a real pipeline service.
² Kafka › should persist empty schemaRegistryTopicSuffixName timed out waiting for the save PATCH once, then passed on an isolated re-run.

Not covered by an existing spec: the bulk-edit custom-property entity-reference cell (DataAssetAsyncSelectList in CSVUtilsClassBase) — covered by its Jest tests.

  • Spec changes: SearchIndexApplication picks Table in the entities multi-select (enum-multi-select-root/entities) instead of driving the antd tree; DataInsightReportApplication and DataInsightSettings click the switch label, since the field id now sits on the visually hidden switch input; DataInsightSettings picks the backfill dates with the existing pickDateInCorePicker helper, since they are now core DatePickers.
  • Collate renders the entities field with its own AppConfigArrayField (from openmetadata-collate#7265); open-metadata/openmetadata-collate#7329 removes it so Collate uses the same widget and these specs match both.

Manual testing performed

Local dev server against a local 2.0.0-SNAPSHOT stack:

  • Context Center → Memories: the "All Assets" filter and the Add Memory → "Link an Asset" picker show the shared rows, count bar and footer; a delayed search shows the loading row, then the results.
  • Settings → Applications → Search Indexing → Configuration: toggling Auto Tune highlights its doc-panel section (checked when the entities field was still the tree widget; to re-check with the multi-select).
  • Settings → SSO → LDAP: "Trust Store Config Type" shows its label once.

UI screen recording / screenshots:

TODO: attach the asset filter (idle / searching / results), Link an Asset picker, Search Indexing entities tree (closed / open) and SSO LDAP select screenshots.

Checklist:

  • I have read the CONTRIBUTING document.

  • My PR title is Fixes <issue-number>: <short explanation>

  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.

  • I have commented on my code, particularly in hard-to-understand areas.

  • For JSON Schema changes: not applicable, no schema changes.

  • For UI changes: I attached a screen recording and/or screenshots above.

  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

  • I have added tests around the new logic.


Summary by Gitar

  • Form builder migration:
    • Switched application configuration and run history screens from FormBuilder to FormBuilderV1
    • Replaced SelectWidget with CoreSelectWidget in SSOConfigurationForm
    • Routed form-level onFocus to custom fields through formContext.handleFocus in FormBuilderV1
  • Removed legacy form code:
    • Deleted FormBuilder and the legacy JSON schema select, async select, tree select and password widgets
  • Tree select support:
    • Added CoreTreeSelectWidget for string enum multi-selects with an all sentinel
    • Routed treeSelect arrays in CoreArrayField to RJSF's array field
  • SSO field rendering:
    • Hid duplicate label and description in SSO enum selects via the field template
  • Playwright impact map:
    • Mapped FormBuilderV1 widgets and legacy JSON schema widgets to affected specs

This will update automatically on new commits.

DataAssetAsyncSelectList (an Autocomplete select control) and
DataAssetSelectList (a trigger-based picker) rendered their popups
independently. Share the picker's pieces so both look the same:

- core Autocomplete: optional popoverHeader / popoverFooter slots,
  pinned around a separately scrolling list
- extract DataAssetPickerCountBar and DataAssetPickerFooter from the
  picker shell
- DataAssetAsyncSelectList renders DataAssetPickerRow and the shared
  count bar and footer; users and teams keep their avatar row
- DataAssetPickerRow highlights react-aria focus and carries an
  option-<fqn> test id
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Oct 6, 2026
Every open re-ran the empty search and cleared the options first, so the
dropdown blinked "no data" until the response arrived, with no loading
indicator in the autocomplete.

- useAsyncDataAssetOptions keeps the current options while a search
  loads and skips a query it already shows (same index and filter)
- core Autocomplete takes an optional emptyState; DataAssetAsyncSelectList
  shows the shared DataAssetPickerLoading row there while loading
- DataAssetPickerShell uses the same loading row
@chirag-madlani
chirag-madlani marked this pull request as ready for review October 7, 2026 05:01
Copilot AI balanced review requested due to automatic review settings October 7, 2026 05:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This 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 skip-pr-checks label.

@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — merge_conflict (2026-10-12T16:05:49Z)

The entry left the queue before it was built, so no checks ran against it.

# Conflicts:
#	openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/McpApplicationConfiguration/McpApplicationConfiguration.test.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/McpApplicationConfiguration/McpApplicationConfiguration.tsx
Copilot AI balanced review requested due to automatic review settings October 12, 2026 16:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chirag-madlani
chirag-madlani added this pull request to the merge queue Oct 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — merge_conflict (2026-10-12T22:34:42Z)

The entry left the queue before it was built, so no checks ran against it.

# Conflicts:
#	openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppRunsHistory/AppRunsHistory.component.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppRunsHistory/AppRunsHistory.merge.test.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/common/FormBuilder/FormBuilder.tsx
Copilot AI balanced review requested due to automatic review settings October 13, 2026 04:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chirag-madlani
chirag-madlani added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-13T05:42:42Z)

Blocked the queue: playwright-summary

Failed Playwright tests:

  • Pages/DataInsightSettings.spec.ts › Install application
  • Pages/SearchIndexApplication.spec.ts › Search Index Application

Copilot AI balanced review requested due to automatic review settings October 13, 2026 05:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 06:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 07:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitar-bot

gitar-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 6 closed / 6 findings

🟡 Medium risk · Migrating app and SSO forms to FormBuilderV1 changes field rendering and selection behavior, which could cause users to submit unintended configuration values.

Unifies the data asset autocomplete with the picker dropdown (shared rows, count bar, footer, loading row) and moves remaining app and SSO forms from the legacy FormBuilder to FormBuilderV1. Resolved this session: the count bar now excludes hidden selected options, repeat queries no longer let stale in-flight searches overwrite results, unused imports that broke the tsc build were removed, the read-only run config modal Submit button works, validator is optional for callers, and SSO enum selects no longer show their label, description and errors twice. No open issues found.

✅ 6 closed
✅ Bug: Count bar counts selected options that the list hides

📄 openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetAsyncSelectList.tsx:179-181 📄 openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetAsyncSelectList/DataAssetAsyncSelectList.tsx:101-104
The header shows count={items.length}, but items still contains the options that are already selected. Autocomplete removes those from what it renders (visibleItems drops any selectedKeys). In multiple mode, if you select 2 of 2 loaded results, the list is empty but the bar still says "Showing 2 of 2". On the other side, total is the raw search total, which still includes results removed by filterFqns, while count leaves them out. To fix this, count only the options that can actually be shown by excluding the selected ids, so the number matches the rows on screen.

✅ Bug: Skipped repeat query lets an in-flight search overwrite the list

📄 openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetSelectList/useAsyncDataAssetOptions.ts:100-104 📄 openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetSelectList/useAsyncDataAssetOptions.ts:118
loadedQuery only changes after a search succeeds, and the early return skips ++latestRequest.current. Here is how it breaks: the list shows results for '', the user types o (a debounced search for o starts), then deletes it before that search returns. loadOptions('') matches loadedQuery and returns without invalidating the pending request. When the o response lands it passes the request === latestRequest.current check, so the empty input now shows o results (and loadedQuery becomes o). isLoading also stays true until that response arrives. The fix is to cancel any pending request when skipping, by bumping latestRequest and clearing the loading flag.

✅ Bug: Unused FormBuilder/validator/ServiceCategory imports break tsc build

📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/ApplicationConfiguration/ApplicationConfiguration.tsx:15 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/ApplicationConfiguration/ApplicationConfiguration.tsx:19 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/ApplicationConfiguration/ApplicationConfiguration.tsx:25 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/McpApplicationConfiguration/McpApplicationConfiguration.tsx:16 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/McpApplicationConfiguration/McpApplicationConfiguration.tsx:22 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppRunsHistory/AppRunsHistory.component.tsx:15 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppRunsHistory/AppRunsHistory.component.tsx:35 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppRunsHistory/AppRunsHistory.component.tsx:60
After the switch to FormBuilderV1, these three files still import things they no longer use: validator from @rjsf/validator-ajv8, ServiceCategory, and the old FormBuilder (ApplicationConfiguration.tsx:25, AppRunsHistory.component.tsx:60). Nothing references them any more. The UI tsconfig sets noUnusedLocals: true, so tsc (and the lint/build step) will fail with TS6133. Remove the unused imports from all three files.

✅ Bug: Read-only run config modal now shows a working Submit button

📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppRunsHistory/AppRunsHistory.component.tsx:574-585
The old FormBuilder hid its submit button when readonly was set ({!isReadOnlyForm && submitButton}). FormBuilderV1 has no such check: it renders the footer and the primary Submit button unless hideFooter is passed. Because the AppRunsHistory configuration modal now renders FormBuilderV1 with readonly but without hideFooter, users see an enabled Submit button inside a read-only view, and clicking it does nothing (onSubmit={noop}). This sits next to the modal's own Close button. Pass hideFooter here, which also lets you drop the unused okText, cancelText and onCancel props.

✅ Bug: Extending full FormProps makes validator required for all callers

📄 openmetadata-ui/src/main/resources/ui/src/components/common/FormBuilderV1/FormBuilderV1.interface.ts:17 📄 openmetadata-ui/src/main/resources/ui/src/components/common/FormBuilderV1/FormBuilderV1.tsx:131 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/McpApplicationConfiguration/McpApplicationConfiguration.tsx 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppRunsHistory/AppRunsHistory.component.tsx 📄 openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/ApplicationConfiguration/ApplicationConfiguration.tsx
In @rjsf/core 5.24.13, FormProps.validator is a required prop. The interface now extends FormProps and no longer uses Omit<FormProps, 'validator'>, so validator becomes required on FormBuilderV1Props. None of the existing callers pass it: McpApplicationConfiguration, AppRunsHistory, ApplicationConfiguration, ConnectionConfigForm, EmbeddedConnectionConfigForm and FormBuilderV1.test.tsx. All of them will now fail type-checking. The props.validator ?? validator fallback shows the prop was meant to be optional, so declare it that way.

...and 1 more closed from earlier reviews

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

Options

Display: compact → Counting what did not apply, without listing it.

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

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

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.

Support DataAssetList with AutoComplete like component

5 participants