fix(ui): show original casing for tag-like options in Advanced Search - #33007
fix(ui): show original casing for tag-like options in Advanced Search#33007harsh-vador wants to merge 4 commits into
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ Playwright Results — workflow succeededValidated commit ✅ 4474 passed · ❌ 0 failed · 🟡 10 flaky · ⏭️ 1 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) 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:
🟡 10 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 |
|
| 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-changedTerms 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>
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>
Code Review ✅ ApprovedFixes Advanced Search tag-like options display by threading 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 |
|



Describe your changes
Fixes #31999 (Advanced Search half).
Terms aggregations on
lowercase_normalizerkeyword 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 notificationinstead ofAdvanced Shipment Notification).This threads
sourceFields: 'fullyQualifiedName'into the five aggregation-basedautocomplete()field configs (TAG,GLOSSARY_TERMS,CERTIFICATION,TIER,COLUMN_TAG) so the request adds atop_hitssub-aggregation and the option label is resolved from_sourcewith its original casing — the same mechanismNAME_KEYWORDalready uses, built on theparseBucketsData/extractSourceValueplumbing from #32190.Why this does not change query results
The target fields (
tags.tagFQN,columns.tags.tagFQN,tier.tagFQN,certification.tagLabel.tagFQN) are allkeywordwithlowercase_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
sourceFieldsargument per field config (AdvancedSearchClassBase.test.ts), 61/61 pass.🤖 Generated with Claude Code