Repository navigation
Fix AiObservabilityAlerts receiver flake: keep the team/user picker open while the drawer scrolls - #36887
Conversation
…olls The receiver picker became a portalled isNonModal Popover in #36707. React-aria closes such a popover on any scroll of an ancestor of its trigger, so the add-alert drawer, still settling after a destination is added, closed the picker right after it opened. That made AiObservabilityAlerts "saves every destination kind" the top flaky merge-queue test. The picker already owns outside-press dismissal, so drop react-aria's close request (as core TreeSelect and FilterSelect do) and handle Escape in the same document listener.
With react-aria's close-on-scroll dropped, a wheel or touch scroll of the form left the portalled picker floating over the wrong destination. Close on a user-started scroll outside the picker; the settling scrolls behind the flake fire neither event. Escape no longer closes the picker while it ends an IME composition, matching react-aria.
React-aria's dropped close request also covered blur; close on a focusin outside the picker and its trigger instead.
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
Fixes two openmetadata-imports/no-lower-layer-page-imports warnings: the key list is a plain union, and the test takes its types from the sibling AlertAiFormFields interface.
Code Review ✅ Approved🟡 Medium risk · Changing picker dismissal to ignore popover close requests and handle outside events manually could leave the receiver picker open or close it unexpectedly. Keeps the alert team/user receiver picker open when an ancestor of its trigger scrolls programmatically, fixing the VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. 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 the
Features/AIMode/AiObservabilityAlerts.spec.ts:309 › saves every destination kind with its receivers and authenticationflake. It was the top flaky merge-queue test in the 2026-11-02 Playwright report: 3 failures and 7 flaky runs across 4 PRs.Root cause. #36707 moved the team/user receiver picker (
TeamUserSelectInputinAlertAiDestinationConfigFields.component.tsx) into a portalled<Popover isNonModal>. For a non-modal popover, react-aria closes it on any scroll of an element that contains the trigger:usePopoverpassesonClose: state.closetouseOverlayPosition. The add-alert drawer is often still scrolling after a destination is added. The picker opened, that scroll closed it,searchTextreset, and the test waited 180 s on ateam-user-option-…button that had been removed from the page.Evidence from the merge-queue reports:
element was detached from the DOM, retryingonteam-user-option-PW%team-…, then a test timeout.Fix. The picker already handles its own dismissal with an outside-
pointerdownlistener. SoonOpenChangenow acts only on react-aria's open request, the same approach coreTreeSelectandFilterSelectuse for this bug. To replace what react-aria's close handled:Type of change:
High-level design:
N/A — small change (one component, one new test file).
Tests:
Use cases covered
Unit tests
AlertAiDestinationConfigFields.component.test.tsx, 6 tests, 6 passing. It renders the real corePopoverand react-aria; only the search utils and i18n are mocked.Backend integration tests
Not applicable — UI-only change.
Ingestion integration tests
Not applicable — no ingestion changes.
Playwright (UI) tests
No spec changes. The existing spec is the regression check.
I ran everything locally on a Vite dev server for this branch, against a local OSS Docker backend, with
PLAYWRIGHT_IS_OSS=trueand--retries=0:saves every destination kind×10team-user-option-…saves every destination kind×1045c0c48fc659AiObservabilityAlerts.spec.ts×3make playwright_affected_runat the final HEAD45c0c48fc659:Local Playwright run: impacted specs PASSED (26/26) · smoke 41/42, 1 environment failure (
Dashboards.spec.ts:189, see below)45c0c48fc659(baseorigin/main)playwright/e2e/Features/AIMode/AiAlertPermissions.spec.tsplaywright/e2e/Features/AIMode/AiObservabilityAlerts.spec.tsplaywright/e2e/Features/AIMode/Observability.spec.tsplaywright/e2e/Features/Dashboards.spec.tsplaywright/e2e/Flow/Navbar.spec.tsplaywright/e2e/Pages/DataMarketplace.spec.tsplaywright/e2e/Pages/Lineage/LineageControls.spec.tsplaywright/e2e/Pages/Policies.spec.tsplaywright/e2e/auth.setup.tsplaywright/e2e/entity-data.setup.tsplaywright/e2e/entity-data.teardown.tsCommand
Dashboards.spec.ts:189is a smoke spec and fails without this change too: the local backend has nosample_superset.model.big_analytics_data_model_with_nested_columns(the screenshot shows "Data model instance … not found"). That data model comes from current sample data, which the older local Docker build doesn't have. I revertedAlertAiDestinationConfigFields.component.tsxto base and the test still failed the same way. It covers dashboard data-model tags, which the alert picker doesn't affect.Manual testing performed
:3300, against the local Docker backend on:8585.UI screen recording:
Not applicable — this fixes a flaky test; there is no new feature or UI.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>— test fix, so it has a descriptive title and theskip-pr-checkslabel instead.My PR is linked to a GitHub issue via
Fixes #<issue-number>above — test fix, no issue.I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: N/A.
For a UI feature or feature task: N/A — test fix.
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Self-review: I reviewed the final diff against
REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.5103eb00568e; the focus fix was added after it. No 🔴. Fixed 🟡: a user scroll left the popover detached from its trigger; Escape during an IME composition closed the picker; focus moving away no longer closed it; an out-of-datepreventScrollcomment.TeamAndUserSelectItempicker still closes on ancestor scroll. The "drop react-aria's close" pattern now exists in three places and could become a corePopoverprop.Decision check: no new decision; this follows the existing core
TreeSelect/FilterSelectpattern.I have added a test that covers the exact scenario we are fixing.
🤖 Generated with Claude Code