Skip to content

Chore(UI): Allow decimal values in the search settings boost values#27410

Open
aniketkatkar97 wants to merge 6 commits intomainfrom
allow-decimal-impact
Open

Chore(UI): Allow decimal values in the search settings boost values#27410
aniketkatkar97 wants to merge 6 commits intomainfrom
allow-decimal-impact

Conversation

@aniketkatkar97
Copy link
Copy Markdown
Member

This pull request enhances the search settings test suite and improves the precision and reliability of field value boost and slider controls in the UI. The main changes include updating the Playwright test setup to better handle admin authentication, adding comprehensive tests for field value boost functionality, and increasing slider precision in several UI components.

Test Improvements and Admin Authentication:

  • Refactored the Playwright test setup in SearchSettings.spec.ts to use a dedicated admin user fixture, ensuring more reliable authentication and isolation for tests involving toast notifications. The performAdminLogin utility is now used instead of createNewPage for all admin actions. [1] [2] [3]

Field Value Boost E2E Coverage:

  • Added end-to-end tests for adding and removing field value boosts in search settings, including UI interactions and toast notification verifications.

Slider Precision Improvements:

  • Updated the Slider components in FieldConfiguration.tsx, FieldValueBoostModal.tsx, and TermBoost.tsx to support decimal steps (step={0.1}), allowing for more precise adjustments. [1] [2] [3]
  • Modified the slider utility in searchSettingUtils.ts to target .ant-slider-step for track dimensions, improving reliability of slider manipulation in tests.
Screen.Recording.2026-04-16.at.9.59.14.AM.mov

@aniketkatkar97 aniketkatkar97 self-assigned this Apr 16, 2026
@aniketkatkar97 aniketkatkar97 requested a review from a team as a code owner April 16, 2026 04:30
@aniketkatkar97 aniketkatkar97 added the To release Will cherry-pick this PR into the release branch label Apr 16, 2026
Copilot AI review requested due to automatic review settings April 16, 2026 04:30
@github-actions github-actions bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Apr 16, 2026
@aniketkatkar97 aniketkatkar97 linked an issue Apr 16, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves Search Settings UI precision by allowing decimal slider values for boost/weight controls, and expands Playwright coverage for Search Settings updates (including field value boost add/remove), while refactoring test authentication utilities.

Changes:

  • Updated several Ant Design Slider controls to use step={0.1} for decimal precision.
  • Refactored SearchSettings.spec.ts to use an admin page fixture and performAdminLogin for admin actions.
  • Updated Playwright slider manipulation utility to compute dimensions using .ant-slider-step and added E2E flow for field value boosts.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/TermBoost/TermBoost.tsx Enables decimal term boost slider steps.
openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FieldValueBoostModal/FieldValueBoostModal.tsx Enables decimal factor slider steps for field value boosts.
openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FieldConfiguration/FieldConfiguration.tsx Enables decimal field weight slider steps.
openmetadata-ui/src/main/resources/ui/playwright/utils/searchSettingUtils.ts Adjusts slider dimension targeting for more reliable test interactions.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SearchSettings.spec.ts Refactors admin authentication flow and adds E2E coverage for field value boost add/remove.
Comments suppressed due to low confidence (4)

openmetadata-ui/src/main/resources/ui/playwright/utils/searchSettingUtils.ts:100

  • The locator was changed to .ant-slider-step, but the thrown error still says “Slider track not found”. Updating the message to reflect the actual element being located will make failures much easier to debug.
  const sliderHandle = page.getByTestId(testId).locator('.ant-slider-handle');
  const sliderTrack = page.getByTestId(testId).locator('.ant-slider-step');

  // Get slider track dimensions
  const box = await sliderTrack.boundingBox();
  if (!box) {
    throw new Error('Slider track not found');
  }

openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FieldConfiguration/FieldConfiguration.tsx:185

  • With step={0.1}, slider onChange values can suffer from JS floating-point artifacts (e.g. 25.600000000000001) and the UI currently renders fieldWeight directly. Consider normalizing the value in handleWeightChange (e.g., round to 1 decimal) and/or formatting the displayed value so users don’t see long float representations.
            <Slider
              max={100}
              min={0}
              step={0.1}
              tooltip={{ open: false }}
              value={fieldWeight}
              onChange={handleWeightChange}
            />

openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/FieldValueBoostModal/FieldValueBoostModal.tsx:164

  • With step={0.1}, factor may pick up floating-point artifacts and it’s rendered directly in the modal header. Consider rounding/normalizing the slider value in handleFactorChange (e.g., to 1 decimal) and/or formatting the displayed value to avoid showing long float representations.
            <Slider
              max={100}
              min={0}
              step={0.1}
              tooltip={{ open: false }}
              value={factor}
              onChange={handleFactorChange}
            />

openmetadata-ui/src/main/resources/ui/src/components/SearchSettings/TermBoost/TermBoost.tsx:169

  • With step={0.1}, termBoostData.boost may end up with floating-point artifacts and it’s rendered directly in the UI. Consider rounding/normalizing the slider value in handleBoostChange (e.g., to 1 decimal) and/or formatting the displayed value to avoid long float representations.
            <Slider
              max={100}
              min={0}
              step={0.1}
              tooltip={{ open: false }}
              value={termBoostData.boost}
              onChange={handleBoostChange}
            />

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.74% (59601/93500) 43.65% (31364/71851) 46.74% (9425/20161)

Copilot AI review requested due to automatic review settings April 16, 2026 11:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

🔴 Playwright Results — 1 failure(s), 33 flaky

✅ 3603 passed · ❌ 1 failed · 🟡 33 flaky · ⏭️ 111 skipped

Shard Passed Failed Flaky Skipped
🔴 Shard 1 454 1 3 26
🟡 Shard 2 643 0 4 7
🟡 Shard 3 644 0 8 1
🟡 Shard 4 619 0 7 27
🟡 Shard 5 613 0 1 42
🟡 Shard 6 630 0 10 8

Genuine Failures (failed on all attempts)

Features/DataAssetRulesDisabled.spec.ts › Verify the ApiEndpoint entity item action after rules disabled (shard 1)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoContainText�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator: getByTestId('domain-link')
Expected substring: �[32m"PW Domain �[7me1932d64�[27m"�[39m
Received string:    �[31m"PW Domain �[7m7a36ee45�[27m"�[39m
Timeout: 15000ms

Call log:
�[2m  - Expect "toContainText" with timeout 15000ms�[22m
�[2m  - waiting for getByTestId('domain-link')�[22m
�[2m    19 × locator resolved to <a data-testid="domain-link" href="/domain/%22PW%25domain.7a36ee45%22" class="no-underline domain-link domain-link-text font-medium text-sm render-domain-lebel-style">PW Domain 7a36ee45</a>�[22m
�[2m       - unexpected value "PW Domain 7a36ee45"�[22m

🟡 33 flaky test(s) (passed on retry)
  • Features/DataAssetRulesDisabled.spec.ts › Verify the Database entity item action after rules disabled (shard 1, 2 retries)
  • Features/CustomizeDetailPage.spec.ts › Data Product - customization should work (shard 1, 1 retry)
  • Pages/AuditLogs.spec.ts › should include filters and search in export request (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/ChangeSummaryBadge.spec.ts › Automated badge should appear on entity description with Automated source (shard 2, 1 retry)
  • Features/DataProductPersonaCustomization.spec.ts › Data Product - customization should work (shard 2, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should cancel move operation (shard 2, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 2 retries)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should not show online status for inactive users (shard 3, 1 retry)
  • Flow/CustomizeWidgets.spec.ts › Data Products Widget (shard 3, 1 retry)
  • Flow/ExploreDiscovery.spec.ts › Should not display soft deleted assets in search suggestions (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Dashboard (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for DashboardDataModel (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Api Collection (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Owner Rule Any_In (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Comprehensive domain rename with ALL relationships preserved (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Verify Domain entity API calls do not include invalid domains field in tag assets (shard 4, 1 retry)
  • Pages/Glossary.spec.ts › Add and Remove Assets (shard 5, 1 retry)
  • Pages/HyperlinkCustomProperty.spec.ts › should show No Data placeholder when hyperlink has no value (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Topic (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/Login.spec.ts › Refresh should work (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/Tag.spec.ts › Add and Remove Assets (shard 6, 1 retry)
  • ... and 3 more

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 16, 2026

Code Review ✅ Approved

Updates search settings to accept decimal values for boost factors, allowing for more granular ranking control. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@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 To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow decimal values for search settings boost values

3 participants