Skip to content

fix(ui): show original casing for tag-like options in Advanced Search - #33007

Open
harsh-vador wants to merge 4 commits into
mainfrom
fix-31999-advanced-filter-casing
Open

fix(ui): show original casing for tag-like options in Advanced Search#33007
harsh-vador wants to merge 4 commits into
mainfrom
fix-31999-advanced-filter-casing

Conversation

@harsh-vador

Copy link
Copy Markdown
Contributor

Describe your changes

Fixes #31999 (Advanced Search half).

Terms aggregations on lowercase_normalizer keyword fields return lowercased bucket keys, so the Advanced Search query builder displayed tag, glossary term, tier and certification options in lowercase (e.g. advanced shipment notification instead of Advanced Shipment Notification).

This threads sourceFields: 'fullyQualifiedName' into the five aggregation-based autocomplete() field configs (TAG, GLOSSARY_TERMS, CERTIFICATION, TIER, COLUMN_TAG) so the request adds a top_hits sub-aggregation and the option label is resolved from _source with its original casing — the same mechanism NAME_KEYWORD already uses, built on the parseBucketsData/extractSourceValue plumbing from #32190.

Why this does not change query results

The target fields (tags.tagFQN, columns.tags.tagFQN, tier.tagFQN, certification.tagLabel.tagFQN) are all keyword with lowercase_normalizer; Elasticsearch applies the normalizer to term-level query input, so an original-cased value matches exactly what the lowercased value matched. Previously-saved filters with lowercase values keep working unchanged.

The JSONLogic query builder is unaffected: its tag/glossary fields use searchAutocomplete (search API over real _source), which already returns original casing.

Testing

  • 5 new regression tests pin the sourceFields argument per field config (AdvancedSearchClassBase.test.ts), 61/61 pass.
  • ESLint and Prettier clean on changed files.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the UI UI specific issues label Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 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!

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 7fc3bdf466251af20b9c58e3d0cbbd70b172b2da in Playwright run 34326792863, attempt 1.

✅ 4474 passed · ❌ 0 failed · 🟡 10 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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) 55m 54s

⏱️ Max setup 6m 56s · max shard execution 21m 12s · max shard-job elapsed before upload 24m 26s · reporting 20s

🌐 218.02 requests/attempt · 2.31 app boots/UI scenario · 31.68% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 31.68% (convergence target: at most 15%).
  • Browser traffic was 218.02 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.31 per UI scenario (10920 boots / 4735 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 130 0 0 0 0 0
✅ Shard chromium-01 140 0 0 0 0 0
🟡 Shard chromium-02 141 0 1 0 0 0
🟡 Shard chromium-03 159 0 1 0 0 0
🟡 Shard chromium-04 157 0 1 0 0 0
🟡 Shard chromium-05 107 0 2 0 0 0
✅ Shard chromium-06 162 0 0 0 0 0
🟡 Shard chromium-07 158 0 1 0 0 0
✅ Shard chromium-08 197 0 0 0 0 0
🟡 Shard chromium-09 190 0 1 0 0 0
✅ Shard chromium-10 175 0 0 0 0 0
✅ Shard chromium-11 158 0 0 0 0 0
🟡 Shard chromium-12 158 0 1 1 0 0
✅ Shard chromium-13 178 0 0 0 0 0
🟡 Shard chromium-14 163 0 1 0 0 0
✅ Shard chromium-15 149 0 0 0 0 0
🟡 Shard chromium-16 171 0 1 0 0 0
✅ Shard chromium-17 173 0 0 0 0 0
✅ Shard chromium-18 177 0 0 0 0 0
✅ Shard chromium-19 171 0 0 0 0 0
✅ Shard chromium-20 177 0 0 0 0 0
✅ Shard chromium-21 168 0 0 0 0 0
✅ Shard chromium-22 189 0 0 0 0 0
✅ Shard chromium-23 159 0 0 0 0 0
✅ Shard chromium-24 147 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 52 0 0 0 0 0
✅ Shard import-export-02 98 0 0 0 0 0
✅ Shard ingestion-01 39 0 0 0 0 0
✅ Shard ingestion-02 47 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 10 flaky test(s) (passed on retry)
  • Pages/ServiceEntity.spec.tsAnnouncement create, edit & delete (shard chromium-02, 1 retry)
  • Pages/Domains.spec.tsFollow/unfollow subdomain and create nested sub domain (shard chromium-03, 1 retry)
  • Pages/EntityDataConsumer.spec.tsTier Add, Update and Remove (shard chromium-04, 1 retry)
  • Pages/ServiceEntity.spec.tsTier Add, Update and Remove (shard chromium-05, 1 retry)
  • Pages/ServiceEntity.spec.tsAnnouncement create, edit & delete (shard chromium-05, 1 retry)
  • Features/Workflows/WorkflowOssRestrictions.spec.tsworkflow-name-input is disabled in OSS (shard chromium-07, 1 retry)
  • Pages/DataProductAndSubdomains.spec.tsCreate data product via UI with description (shard chromium-09, 1 retry)
  • Pages/DataContracts.spec.tsContract Status badge should be visible on condition if Contract Tab is present/hidden by Persona (shard chromium-12, 1 retry)
  • Pages/TasksUIFlow.spec.tsCreate and resolve description task for Pipeline via UI (shard chromium-14, 1 retry)
  • Pages/InputOutputPorts.spec.tsOutput ports section collapse/expand (shard chromium-16, 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

@harsh-vador harsh-vador added the safe to test Add this label to run secure Github workflows on PRs label Sep 9, 2026
@harsh-vador harsh-vador self-assigned this Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 1 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 1 warning(s) across 1 changed file(s).

Count Rule
1 openmetadata-imports/no-circular-imports
All findings
Location Rule Message
🟡 src/utils/AdvancedSearchClassBase.ts:48:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 70%
70.47% (95259/135158) 55.02% (56367/102436) 56.4% (18820/33367)

Terms aggregations on lowercase_normalizer keyword fields return lowercased
bucket keys, so the Advanced Search query builder displayed tags, glossary
terms, tier and certification options in lowercase. Request the
fullyQualifiedName source field via the top_hits sub-aggregation (the same
mechanism NAME_KEYWORD already uses) so options carry their original casing.

Query behavior is unchanged: the target fields (tags.tagFQN,
columns.tags.tagFQN, tier.tagFQN, certification.tagLabel.tagFQN) all use
lowercase_normalizer, which normalizes term-level query input, so original-
cased values match identically.

Fixes #31999

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
harsh-vador and others added 2 commits September 9, 2026 13:27
Tag-like fields (tags, tier, certification, glossary) now apply the
original-cased value from the top_hits source, while other fields still
apply the lowercased aggregation key. URL waits, request assertions, and
filter-chip text checks in the advanced-search utils lowercased both sides
or hardcoded lowercase values, so they hung or failed on the new casing.

- waitForSearchQueryWithValues compares lowercased URLs, replacing the
  glob patterns that embedded lowercased encoded FQNs.
- Chip assertions use toContainText(..., { ignoreCase: true }).
- CuratedAssets picks the Tier.Tier5 option by its rendered title and
  checks the query URL case-insensitively.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gitar-bot

gitar-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Fixes Advanced Search tag-like options display by threading sourceFields: 'fullyQualifiedName' into five aggregation-based autocomplete field configs to resolve option labels from _source with original casing instead of lowercased bucket keys. No issues found.

Options

Display: compact → Showing less information.

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

sonarqubecloud Bot commented Sep 9, 2026

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve casing on filters across pages, including advanced filters, for glossary terms and tags

1 participant