fix(alerts): show typed text in email recipients selector#42091
Conversation
The email recipient fields (To/CC/BCC) in the Alerts & Reports modal
styled the select with an `.email-recipient-select > div { width: 100% }`
rule written for the antd v5 DOM, where the direct child div was
`.ant-select-selector`. In the antd v6 DOM the direct child div is
`.ant-select-content`; forcing its width collapses it (and the search
input inside it) to zero width, so typed recipient emails were
invisible. Keep the full-width rule on the select root only.
Adds a regression test that renders the real AsyncSelect (the existing
NotificationMethod tests mock it) and asserts the alerts CSS does not
override the width of antd Select internals, plus behavioral coverage
that a typed email stays visible and becomes a selectable option.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42091 +/- ##
=======================================
Coverage 65.08% 65.08%
=======================================
Files 2747 2747
Lines 153926 153926
Branches 35304 35304
=======================================
Hits 100186 100186
Misses 51828 51828
Partials 1912 1912
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🎪 Showtime deployed environment on GHA for 477ff0e • Environment: http://44.248.227.90:8080 (admin/admin) |
There was a problem hiding this comment.
Code Review Agent Run #2b9f07
Actionable Suggestions - 1
-
superset-frontend/src/features/alerts/components/NotificationMethodEmailRecipients.test.tsx - 1
- Missing fetchMock cleanup between tests · Line 54-63
Review Details
-
Files reviewed - 2 · Commit Range:
477ff0e..477ff0e- superset-frontend/src/features/alerts/components/NotificationMethod.tsx
- superset-frontend/src/features/alerts/components/NotificationMethodEmailRecipients.test.tsx
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
rusackas
left a comment
There was a problem hiding this comment.
LGTM, thanks @sadpandajoe! Good catch on the v6 .ant-select-content shift. I especially like that the regression test renders the real AsyncSelect instead of the mocked one, since that is exactly why the original slipped past. Approving!
SUMMARY
In the Alerts & Reports modal, typing into the "Email recipients" select (and the CC/BCC fields) showed no visible text — the characters were accepted but invisible, so users couldn't see the emails they were entering.
Root cause:
StyledNotificationMethodstyles the recipient selects with an.email-recipient-select > div { width: 100% }rule that was written for the antd v5 DOM, where the select's direct child div was.ant-select-selectorand forcing full width was correct. After the antd v5→v6 upgrade (#41636), the direct child div is.ant-select-content; forcingwidth: 100%on it collapses it to zero width, which shrinks the search input inside it to ~4px — the typed text renders inside an invisible sliver. Verified in a real browser by injecting the modal's CSS cascade rule-by-rule into an isolated Select render: only this rule collapses the input (89px → 4px).The fix keeps the full-width rule on the select root only and drops the
> divhalf. The surrounding.email-recipient-containeris a stretch flex column, so the selects still fill the modal width.Also adds
NotificationMethodEmailRecipients.test.tsx, which renders the realAsyncSelect(the existingNotificationMethod.test.tsxmocks it, which is why it couldn't catch this):BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Screen.Recording.2026-07-15.at.2.56.32.PM.mov
After:
Screen.Recording.2026-07-15.at.2.54.00.PM.mov
TESTING INSTRUCTIONS
Unit tests:
npx jest src/features/alerts/components/NotificationMethodEmailRecipients.test.tsxADDITIONAL INFORMATION
FEATURE FLAGS
FEATURE_ALERT_REPORTS=true
FEATURE_ALERT_REPORT_TABS=true
FEATURE_ALERT_REPORTS_FILTER=true
🤖 Generated with Claude Code